home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #2 / Amiga Plus CD - 1995 - No. 2.iso / internet / faq / englisch / aix < prev    next >
Encoding:
Text File  |  1995-04-11  |  220.8 KB  |  6,110 lines

  1. Archive-name: aix-faq/part1
  2. Last-modified: Feb 13, 1995
  3. Version: 4.00
  4.  
  5.  
  6. Next month the FAQ will most likely be coming to you from my AOL.net
  7. account as I have accepted a position there.  As part of moving the
  8. FAQ to a different account I'll have to get it re-approved and will
  9. most likely break it up into 4 parts.  (Some of you I'm sure have
  10. notice that every section of the FAQ is now >64k which is difficult
  11. for some of our viewers to handle).  Please note my new address, as I
  12. don't know how long my /etc/aliases entry will exist on the AMS
  13. machine.  Any suggestions for restructuring the FAQ will be
  14. appreciated and I'll review with the ones that I've already received.
  15.  
  16. Frequently Asked Questions to AIX 3.x and IBM RS/6000
  17. _____________________________________________________
  18.  
  19. This posting contains frequently asked questions and answers about the
  20. IBM RS/6000 series workstations and AIX version 3. All input is very
  21. welcome, I can be reached at a165@lehigh.edu.
  22.  
  23. The list is split into three articles to pass thru most mailers. I'll
  24. usually try to post them once a month to comp.unix.aix, news.answers,
  25. and comp.answers. Please let your input continue as I am most thankful
  26. for all of it.
  27.  
  28. This FAQ is availible from (see section 6.08 for more sites):
  29. ftp://rtfm.mit.edu:/pub/usenet/news.answers/aix-faq/part1
  30. ftp://rtfm.mit.edu:/pub/usenet/news.answers/aix-faq/part2
  31. ftp://rtfm.mit.edu:/pub/usenet/news.answers/aix-faq/part3
  32. http://www.cis.ohio-state.edu/hypertext/faq/usenet/aix-faq/top.html
  33.  
  34. If you see a From: line it means that whatever follows is either an
  35. unabridged or slightly edited version of the input I have received, and
  36. that I may not have verified its contents. If there is no From: line, I
  37. probably know what I am talking about, and the entry is edited from
  38. various sources.
  39.  
  40. All entries are numbered with major and minor subject number, e.g. 
  41. 2.11. If the subject is preceded by an asterisk, that entry has been
  42. changed or added since the last posting.
  43.  
  44. The comp.unix.aix group is for AIX on all IBM platforms -- RT, PS/2,
  45. 370, RS/6000 and mainframes (ESA based on OSF/1), but the traffic has
  46. evolved to discuss predominantly AIX 3.x and the RS/6000. The
  47. newsgroups comp.sys.ibm.pc.rt and comp.sys.ibm.ps2.hardware cover the
  48. RT, mostly hardware and AOS 4.3, and on PS/2 hardware respectively. 
  49. Mark Whetzel posts FAQ lists about RTs in the rt and *.answers groups.
  50. There are few to non-existent discussions on AIX/370 and AIX/ESA.
  51.  
  52. This article covers only AIX 3.x and the RS/6000, except when noted.
  53.  
  54. If you post questions to comp.unix.aix, please be sure to indicate:
  55.  
  56. - the machine type and brief configuration, e.g. Model 540, 64 MB RAM,
  57.   48 MB swap space (this is actually bad), 1.2 GB XYZ hard drive, etc.
  58.   Note: There are now three classes of RS/6000s - the original, RS or
  59.   POWER, RS/2 or POWER2, and PowerPC.
  60.  
  61. - the exact AIX version number, i.e. AIX 3.1 is NOT sufficient, whereas
  62.   AIX 3.1.5 or AIX 3.1 with the 3005 update is. With 3.2 you should
  63.   mention any significant ptfs using the U4xxxxx numbers.
  64.  
  65. I am doing this on my own time. Please do not ask me questions that
  66. should be asked to IBM. If you suspect you have software defect problems
  67. call (800) 237-5511. If you have hardware problems call (800) IBM-SERV.
  68. ______________________________________________________________________________
  69.  
  70. Table of contents:
  71.  
  72. 1.0    General concepts
  73. 1.000  The AIX operating system - what is it?
  74. 1.001* I know neither Unix nor AIX - where do I find more information?
  75. 1.002  What is the Object Database?
  76. 1.003  How do I get rid of the verbose error messages?
  77. 1.004  Which release of AIX do I have?
  78.  
  79. 1.1*   SMIT, system administration
  80. 1.100  I am used to Unix systems programming, why should I learn SMIT?
  81. 1.101  How do I turn off the "running man" in smit?
  82. 1.102  How do I import an /etc/passwd or /etc/group file from another box?
  83. 1.103  Cleaning up utmp, who, and accounting problems
  84. 1.104  How to fsck the root filesystem
  85. 1.105  How can I unmount /usr to run fsck on it?
  86. 1.108  How do I see/change parameters like number of processes per user?
  87. 1.109  How do I shrink the default paging space on hd6?
  88. 1.110  The swapper seems to use enormous amounts of paging space, why?
  89. 1.111  How much paging space do I need?
  90. 1.112  How do I mount a floppy disk as a filesystem?
  91. 1.113  How do I remove a committed lpp?
  92. 1.114  How can I recover space after installing updates?
  93. 1.115  Where are the AIX log files kept?
  94. 1.116  How can I log information about ftp accesses to a file?
  95. 1.117  How do I find a file name from the inode number?
  96. 1.118  How do I set up postscript accounting?
  97. 1.119  How do I create boot diskettes for 3.2?
  98. 1.120  Where can I find tools for performance monitoring?
  99. 1.121  How can I tell what virtual printer a print queue is using?
  100. 1.122  Two srcmstr's are less useful than one?
  101. 1.123  How do I set the tty name associated with a physical port?
  102. 1.124  How do I use mksysb to clone a system?
  103. 1.125  How do I retain timestamps with mksysb?
  104. 1.126  How can I find out the machine type?
  105. 1.127  Updating to 3.2.5
  106. 1.128  AIX fix strategy
  107. 1.129  Are passwords limited to 8 char?
  108. 1.130  How do I increase the number of ptys > 64?
  109. 1.131  CERT advisories on sendmail and xterm
  110. 1.132  How do I remove a non-existant physical volume?
  111. 1.133  How do I kill a process that ignores kill -QUIT -KILL -STOP?
  112. 1.134  How can I see "console" messages?
  113. 1.135  Where can I find TOP for AIX?
  114. 1.136  How can I restrict root logins to specific terminals?
  115. 1.137  How do I merge my /etc/password and /etc/security/password for Crack
  116. 1.138  I lost the root password, what should I do?
  117. 1.140  SMIT problems forcing/overwriting install?
  118.  
  119. 1.2    Backups, tape
  120. 1.200  Some info about tape backups
  121. 1.201* How do I do remote backup?
  122. 1.202  How do I backup a multi-disk volume group?
  123. 1.203  How do I put multiple backups on a single 8mm tape?
  124. 1.204  How can I make an exact duplicate of a tape over the network?
  125. 1.205  What is tape block size of 0?
  126. 1.206  Resetting a hung tape drive...
  127. 1.207  How do I read a mksysb tape with tar?
  128. 1.208  How do I read a 5Gbyte tape on a 2Gbyte drive?
  129.  
  130. 1.3    Memory and process management
  131. 1.300  Some info about the memory management system
  132. 1.301  How much should I trust the ps memory reports?
  133. 1.302  Which simms do RS6000's use?
  134. 1.303  What is kproc?
  135.  
  136. 1.4    Shells, commands, man pages, InfoExplorer
  137. 1.400  How do I make an informative prompt in the shell?
  138. 1.401  How do I set up ksh for emacs mode command line editing?
  139. 1.402  Listing files with ls causes a core dump
  140. 1.403  How do I put my own text into InfoExplorer?
  141. 1.404  InfoExplorer ASCII key bindings 
  142. 1.405  How can I add new man pages to the system?
  143. 1.406  Why can't I read man pages?  Where is nroff?
  144. 1.407  Why is my enviornment only loaded once?
  145. 1.408  Where is the 'nawk' command on my AIX system?
  146.  
  147. 1.5    Video, Graphics, X11
  148. 1.500  Which release of X11 do I have?
  149. 1.501  How to prevent ctrl-alt-backspace from killing the X session
  150. 1.502  Who has a termcap/terminfo source for aixterm or the HFT console?
  151. 1.503  How can I look at PostScript files?  Why is "dpsexec" so lousy?
  152. 1.504  unix:0 vs `hostname`:0
  153. 1.505  VT100 key bindings for aixterm
  154. 1.506  Is there a screen saver that does not use excessive CPU?
  155. 1.507  Where are the colors, availible for an X session, listed.
  156. 1.508  Why does my app hang the X server but not an X station?
  157. 1.509  How do I switch the control and caps lock key bindings?
  158. 1.510  Missing fonts?
  159. 1.511  What's the termcap entry for an IBM 3151 look like?
  160. 1.512  Errors starting X11 application binaries from aixpdslib.
  161. 1.513  .XShm* Link errors building Xwindows applications.
  162. 1.514  How do I set my DISPLAY when I login to another machine?
  163.  
  164. 1.6    Networks and communications
  165. 1.600  My named dies frequently, why?
  166. 1.601  How do I trace ethernet packets on an AIX system?
  167. 1.602  What is the authorized way of starting automount at boot time?
  168. 1.603  How do I set a tty port for both dial-in and dial-out?
  169. 1.604  How to move or copy whole directory trees across a network
  170. 1.605  How can I send mail to hosts that cannot be pinged?
  171. 1.606  How to configure dialup SLIP
  172. 1.607  Where is DCE discussed?
  173. 1.608  How do I make /var/spool/mail mountable?
  174. 1.609  getty spawning too rapidly
  175. 1.610  Does AIX support Compressed SLIP (CSLIP)?
  176. 1.611  How do I setup anonymous ftp on my AIX system?
  177. 1.612  Talk, getting notification.
  178. 1.613  Disabling software flow control; using RTS/CTS.
  179. 1.614  NIS security
  180.  
  181. 1.7+   LVM
  182. 1.701* How do I shrink /usr?  (formerly 1.106)
  183. 1.702* How do I make a filesystem larger than 2Gb? (formerly 1.107)
  184. 1.703* Chlv warning, is the first 4k of a LV safe? (formerly 1.139)
  185. 1.704+ What's the limit on Physical Partitions Per Volume Group?
  186. 1.705+ Why am I having trouble adding another disk to my VG?
  187.  
  188. 1.9    Miscellaneous
  189. 1.900  SCSI-1 and SCSI-2 "interoperability" got you confused?
  190. 1.901  How to get your keyboard back after unplugging it from the 6000
  191. 1.902  How do I set up pcsim, the DOS emulator?
  192. 1.903  How do I transfer files between AIX and DOS disks?
  193. 1.904  Where is the crypt program?
  194. 1.905  How do I play audio CDs?
  195.  
  196. 2.00  C/C++
  197. 2.01  I cannot make alloca work
  198. 2.02  How do I compile my BSD programs?
  199. 2.03  Isn't the linker different from what I am used to?
  200. 2.04  How do I link my program with a non-shared /lib/libc.a?
  201. 2.05  How do I make my own shared library?
  202. 2.06  Linking my program fails with strange error, why?
  203. 2.07  What's with malloc()?
  204. 2.08  Why does xlc complain about 'extern char *strcpy()'
  205. 2.09  Why do I get 'Parameter list cannot contain fewer ....'
  206. 2.10  Why does xlc complain about '(sometype *)somepointer = something'
  207. 2.11  Some more common errors
  208. 2.12  Can the compiler generate assembler code?
  209. 2.13  Curses
  210. 2.14  How do I speed up linking?
  211. 2.15  What is deadbeef?
  212. 2.16  How do I statically link in 3.2?
  213. 2.17  How do I make an export list from a library archive?
  214. 2.18  imake, makedepend 
  215. 2.19  How can tell what shared libraries a binary is linked with?
  216. 2.20  Can I get a PTF for my C/C++ compiler from the net?
  217.  
  218. 3.00  Fortran and other compilers
  219. 3.01  I have problems mixing Fortran and C code, why?
  220. 3.02  How do I statically bind Fortran libraries and dynamically bind
  221.       C libraries?
  222. 3.03  How do I check if a number is NaN?
  223. 3.04  Some info sources on IEEE floating point
  224.  
  225. 4.00  GNU and Public Domain software
  226. 4.01  How do I find PD software?
  227. 4.02  Are there any ftp sites?
  228. 4.03  General hints
  229. 4.04  GNU Emacs
  230. 4.05  gcc/gdb
  231. 4.06  GNU Ghostscript
  232. 4.07  TeX - Document processing
  233. 4.08  Perl - Scripting language
  234. 4.09  X-Windows
  235. 4.10  Bash - /bin/ksh alternative from FSF
  236. 4.11  Elm - Mail reader
  237. 4.12  Oberon 2.2
  238. 4.13  Kermit - Communications 
  239. 4.14  Gnu dbm
  240. 4.15  tcsh - /bin/ksh alternative
  241. 4.16  Kyoto Common Lisp
  242. 4.17  Tcl/Tk - X-Windows scripting
  243. 4.18  Expect
  244. 4.19  Public domain software on CD
  245. 4.20  Andrew Toolkit
  246. 4.21  sudo
  247. 4.22  Flexfax and other fax software
  248. 4.23  lsof - LiSt Open Files
  249. 4.24  popper - POP3 mail daemon
  250. 4.26  mpeg link errors version 2.0
  251. 4.27  NNTP, INN
  252.  
  253. 5.00  Third party products
  254. 5.02  Disk/Tape/SCSI
  255. 5.03  Memory
  256. 5.04  Others
  257. 5.05  C++ compilers
  258. 5.06  Memory leak detectors
  259. 5.07  PPP
  260. 5.08  Graphics adapters.
  261. 5.09  Training Courses
  262.  
  263. 6.00  Miscellaneous other stuff
  264. 6.01  Can I get support by e-mail?
  265. 6.02  List of useful faxes
  266. 6.03  IBM's ftp, gopher and WWW presence
  267. 6.04  Some RS232 hints
  268. 6.05  What publications are available for AIX and RS/6000?
  269. 6.06  Some acronyms
  270. 6.07  How do I get this by mailserver or ftp?
  271. 6.08  Hypertext version of the FAQ
  272. 6.09  Where can I send suggestions for tools?
  273. 6.10  comp.unix.aix archive availible on the WWW
  274.  
  275. 7.00* Contributors
  276.  
  277. ______________________________________________________________________________
  278. 1.000: The AIX operating system - what is it?
  279.  
  280. This is best answered by reading the text files in /usr/lpp/bos. The
  281. README file there contains general information and the bsd file contain
  282. useful information if you know BSD and/or System V.
  283.  
  284. The last release for the RT PC is 2.2.1. The latest release for PS/2s
  285. and Intel architecture machines is AIX 1.3; for PS/2s only, 1.2.1. For
  286. the RS/6000, there are three major levels, 3.1, 3.2, 4.1, and various
  287. intermediate levels. IBM has dropped support for 3.1.
  288.  
  289. For those who don't have a copy of /usr/lpp/bos/README or bsd, I'll
  290. sumarize: IBM tried to follow IEEE, POSIX 1003.1, ANSI C, FIPS and
  291. then X/Open Issue 3.  Beyond that, AIX is a combination of System V
  292. and BSD.
  293.  
  294.  
  295. 1.001: I know neither Unix nor AIX - where do I find more information?
  296.  
  297. If you are new to Unix, you should look at the other newsgroups in the
  298. comp.unix hierarchy, in particular comp.unix.questions.  There are
  299. FAQs more most of these groups as well.
  300.  
  301. If you need information about C programming, try comp.lang.c or
  302. comp.std.c, the latter for Standard ANSI C issues.  comp.lang.c has a
  303. FAQ posting.
  304.  
  305.  
  306. 1.002: What is the Object Database?
  307. From: Uwe Geuder <Uwe.Geuder@informatik.uni-stuttgart.de>
  308.  
  309. AIX stores most of the system management information in /etc/objrepos,
  310. /usr/lib/objrepos, and /usr/share/lib/objrepos. Files (also referred to
  311. as system object classes) in these directories are adminstered by the
  312. Object Database Manager, ODM, which is a set of library routines and
  313. programs providing basic object oriented database facilities.
  314.  
  315. Under most circumstances, only SMIT or the commands SMIT call (see
  316. 1.100) should be used to change the contents of the system object
  317. classes. A harmless way to look at the object database is to use odmget
  318. <Class> where <Class> is one of the files in /etc/objrepos.
  319.  
  320. Experienced users can use the ODM editor, odme, to navigate the database
  321. in detail. Modifying the database should only be attempted if you know
  322. exactly what you are doing.
  323.  
  324.  
  325. 1.003: How do I get rid of the verbose error messages?
  326. Corrected by Bjorn P. Brox <brox@corena.n>
  327.  
  328. Many of the messages from the Unix commands are available in different
  329. languages. This is controlled by the LANG environment variable, the
  330. default being En_US meaning English in the US. All the default messages
  331. have a message number associated with them, e.g.:
  332.  
  333. $ cat no-such-file
  334. cat: 0652-050 Cannot open no-such-file.
  335.  
  336. If you prefer the terser Unix-looking error message, set your
  337. environment variable LC_MESSAGES to C, and you will get:
  338.  
  339. $ cat no-such-file
  340. cat: Cannot open no-such-file.
  341.  
  342. By default LC_MESSAGES is the same as your environment LANG.  Setting
  343. LANG does also work, but should be avoided since it changes
  344. app-defaults lookup etc.  See locale(): LC_ALL
  345.  
  346.  
  347. 1.004: Which release of AIX or other products do I have?
  348.  
  349. New with 3.2.5: The oslevel command shows OS and component levels.
  350. Run oslevel -help to see options
  351.  
  352. The command 'lslpp -h bos.obj' will show all lines referring to the BOS, 
  353. Basic Operating System.  E.g.:
  354.  
  355. Fix Id  Release         Status    Action     Date       Time     User Name
  356. ------- --------------- --------- ---------- ---------- -------- ---------
  357. Path: /usr/lib/objrepos
  358. bos.obj
  359.         03.02.0000.0000 COMPLETE  COMMIT     12/31/69   18:00:00 root
  360. U401864 03.02.0000.0000 COMPLETE  COMMIT     11/12/92   20:09:35 root
  361. U401968 03.02.0000.0000 COMPLETE  COMMIT     11/12/92   23:18:21 root
  362. U401969 03.02.0000.0000 COMPLETE  COMMIT     11/12/92   23:18:20 root
  363.                  ..........................
  364. U418349 03.02.0000.0000 COMPLETE  COMMIT     08/28/93   15:34:13 root
  365. U419950 03.02.0000.0000 COMPLETE  COMMIT     08/28/93   15:34:11 root
  366.  
  367. For AIX 3.2, you may come across discussions on 3.2.0, 3.2.1, 3.2.2,
  368. 3.2.3 extended, 3.2.4 and 3.2.5.  There is no absolute way to tell which
  369. of these you are running since the newer releases are simply 3.2.0 with
  370. some sets of PTFs added. See above example listing. These selective
  371. fixes could mean there are literally thousands of slightly different
  372. variations of 3.2 in use. Please see section 6 to request some useful
  373. faxes to help with this number game.
  374.  
  375. AIX 3.2.4 and later attempts to resolve this confusion. The OS is
  376. broken down into subsystems so that updates can be applied to an entire
  377. subsystem.  lslpp also sports a new option; use 'lslpp -m bos.obj' to
  378. show what level and update the system is running. You can also use the
  379. new oslevel command. Unless you have a pressing need (such as
  380. applications unsupported on > 3.2.3), it is recommended that you update
  381. to this level. Also see 1.128.
  382.  
  383. ______________________________________________________________________________
  384. 1.100: I am used to Unix systems programming, why should I learn SMIT?
  385.  
  386. Using SMIT is probably very different from your normal way of doing
  387. system administration, but could prove very useful in the long run. In
  388. some areas, in particular TCP/IP, NFS, etc., you can also do things the
  389. normal way, but it is unfortunately difficult to know exactly when the
  390. normal way works. Again, always using SMIT is probably your best way
  391. to go, even when you have to learn a new tool. 
  392.  
  393. What SMIT actually does is build up commands with all required options
  394. to perform the functions requested and execute them. The commands
  395. called and the output they produce are stored in the files smit.script
  396. and smit.log in your home directory. Looking in smit.script may teach
  397. you more about system administration.
  398.  
  399.  
  400. 1.101: How do I turn off the "running man" in smit?
  401.  
  402. Use smitty, the standard curses version or add this line to your .kshrc file:
  403. alias smit="smit -C"
  404.  
  405.  
  406. 1.102: How do I import an /etc/passwd or /etc/group file from another box?
  407.  
  408. Make sure that you run usrck, pwdck (/etc/passwd), and grpck
  409. (/etc/group) to let AIX work its password/group magic.
  410.  
  411.  
  412. 1.103: Cleaning up utmp, who, and accounting problems
  413. From: fritz@scipp.UCSC.EDU (Frederick Staats)
  414.  
  415. This applies if you are running an X11R5 xterm on 3.2.
  416. Add this to the top of X11R5 mit/clients/xterm/main.c:
  417.  
  418. #ifdef AIXV3
  419. #define USE_SYSV_UTMP
  420. #define HAS_UTMP_UT_HOST
  421. #define WTMP_FILENAME "/var/adm/wtmp"
  422. #endif
  423.  
  424. And your utmp problems should go away. If you want xterminal sessions
  425. to go into the wtmp file you need to define -DWTMP in the Imakefile and
  426. be sure the WTMP_FILENAME is set to the right place.
  427.  
  428. The following program by jfh@rpp386.cactus.org (John F. Haugh)
  429. if run in the background by root will clean up the utmp file.
  430.  
  431. #include <sys/types.h>
  432. #include <utmp.h>
  433. #include <fcntl.h>
  434.  
  435. main ()
  436. {
  437.     int    fd;
  438.     struct    utmp    utmp;
  439.  
  440.     while (1) {
  441.         if ((fd = open ("/etc/utmp", O_RDWR)) < 0)
  442.             exit (1);
  443.  
  444.         while (read (fd, &utmp, sizeof utmp) == sizeof utmp) {
  445.             if (utmp.ut_type == USER_PROCESS &&
  446.                     kill (utmp.ut_pid, 0) != 0) {
  447.                 lseek (fd, - (long) sizeof utmp, 1);
  448.                 utmp.ut_type = DEAD_PROCESS;
  449.                 write (fd, &utmp, sizeof utmp);
  450.             }
  451.         }
  452.         close (fd);
  453.         sleep (60);
  454.     }
  455. }
  456.  
  457. Another utmp program was posted to comp.sources.unix, volume 25, issue
  458. 96 by David W. Sanderson (dws@cs.wisc.edu) that also works on AIX 3.1.
  459.  
  460.  
  461. 1.104: How to fsck the root filesystem
  462.  
  463. You can run fsck either in maintenance mode or on mounted filesystems.
  464. Try this:
  465.  
  466.   1. boot from diskette
  467.   2. select maintenance mode
  468.   3. type /etc/continue hdisk0 exit (replace hdisk0 with boot disk if
  469.      not hdisk0)
  470.   4. fsck /dev/hd4
  471.  
  472.  
  473. 1.105: How can I unmount /usr to run fsck on it?
  474. From: accapadi@mathew.austin.ibm.com (Matt Accapadi)
  475. [ This is for 3.2. ]
  476.  
  477. In order to fsck /usr, it has to be unmounted. But /usr cannot be
  478. unmounted because /bin is symbolically linked to /usr/bin. Also
  479. /etc/fsck is symbolically linked to /usr/sbin/fsck.
  480.  
  481. To work around this, when you boot from the boot/maintenance diskettes
  482. and enter maintenance mode, enter "getrootfs hdisk0 sh" instead of
  483. "getrootfs hdisk0" where hdisk0 is the name of the boot disk. Then run
  484. "fsck /dev/hd2".
  485.  
  486.  
  487. 1.108: How do I see/change parameters like number of processes per user?
  488.  
  489. You can use SMIT as described below or simply use lsattr/chdev.
  490. The former will list the current setting as in:
  491.  
  492.   # lsattr -E -l sys0 -a maxuproc
  493.   maxuproc 40 Maximum # of processes allowed per user True
  494.  
  495. and you can then increase the maxuproc parameter:
  496.  
  497.   # chdev -l sys0 -a maxuproc=200
  498.   sys0 changed
  499.  
  500. If you just type 'lsattr -E -l sys0' you will get a list of all
  501. parameters, some of which can be changed but not others.
  502.  
  503. If you want to use smit, do as follows:
  504.  
  505. smit
  506.   System Environments and Processes
  507.     Change / Show Operating System Parameters
  508.       - on this screen you can change by overtyping the following fields:
  509.         - Maximum number of PROCESSES allowed per user
  510.         - Maximum number of pages in block I/O BUFFER CACHE
  511.         - Maximum Kbytes of real memory allowed for MBUFS
  512.       - toggle fields exist for:
  513.         - Automatically REBOOT system after a crash  (false/true)
  514.         - Continuously maintain DISK I/O history (true/false)
  515.  
  516. Info 1.30 erroneously suggests that in AIX 3.2.5 you can set different
  517. limits for different users.
  518.  
  519.  
  520. 1.109: How do I shrink the default paging space on hd6?
  521.  
  522. 1) create a paging space to use temporarily
  523.    mkps -s 20 -a rootvg
  524.  
  525. 2) change default paging space hd6 so it is not used at next reboot
  526.    chps -a n hd6
  527.  
  528. 3) For AIX 3.1, edit /etc/rc.boot4 and change swapon /dev/hd6;
  529.    for AIX 3.2, edit /sbin/rc.boot and change swapon /dev/hd6
  530.    swapon /dev/paging00
  531.  
  532. 4) Update information in boot logical volume
  533.    bosboot -a             (3.1)
  534.    bosboot -a -d hdisk0   (3.2)
  535.  
  536. 5) shutdown and reboot
  537.  
  538. 6) remove current hd6 and create a new one of smaller size
  539.    rmps hd6
  540.    mklv -y hd6 -t paging rootvg <size of PS in 4 Meg blocks>
  541.  
  542. 7) Re-edit /etc/rc.boot4 (3.1), /sbin/rc.boot (3.2) to swap to /dev/hd6
  543.    swapon /dev/hd6
  544.  
  545. 8) Update information in boot logical volume
  546.    bosboot -a             (3.1)
  547.    bosboot -a -d hdisk0   (3.2)
  548.  
  549. 9) change current paging device (paging00) so it is inactive at next boot
  550. v   chps -a n /dev/paging00
  551.  
  552. 10) shutdown, reboot, remove paging00 using the command:
  553.     rmps paging00
  554.  
  555. You can check your paging space with `lsps -a`
  556.  
  557. 1.110: The swapper seems to use enormous amounts of paging space, why?
  558.  
  559. When you run ps, you may see a line like:
  560.  
  561. USER   PID %CPU %MEM    SZ   RSS     TT STAT  TIME CMD
  562. root     0 0.0%  14% 386528  8688      -    S 17:06 swapper
  563.  
  564. This is normal behavior, the swapper looks to ps like it has the entire
  565. paging space plus real memory allocated.
  566.  
  567.  
  568. 1.111: How much paging space do I need?
  569.  
  570. See answer 2 in question 1.300.
  571.  
  572.  
  573. 1.112: How do I mount a floppy disk as a filesystem?
  574. From: op@holmes.acc.Virginia.EDU (Olaf Pors)
  575.  
  576. You can build a filesystem on a floppy and mount it, however the
  577. filesystem will be read only. The reason that the filesystem will be
  578. read only is because AIX Version 3.1.5 cannot create a journal log on a
  579. diskette. The intended use is for temporary access to read only data. 
  580. The diskette file system must be unmounted after use and during system
  581. backup procedures or errors could occur.
  582.  
  583. To make the read only filesystem on a floppy:
  584.  
  585. 1. Make a subdirectory on an existing filesystem and place all of the
  586.    files that the diskette will contain into this subdirectory.
  587.  
  588. 2. Enter the following command to create a prototype file containing
  589.    information about the new filesystem, in the example /dir_struct
  590.    is the pathname of the subdirectory created in step 1, and
  591.    proto_filename is the name of the prototype file to be created.
  592.  
  593.          proto /dir_struct > proto_filename
  594.  
  595. 3. Place a formatted floppy into the drive.
  596.  
  597. 4. Edit the prototype file and replace the first line with the following:
  598.  
  599.          <noboot> 0 0
  600.  
  601. 5. Enter the following command to make the filesystem on your floppy:
  602.  
  603.           mkfs -p proto_filename -V jfs /dev/fd0
  604.  
  605. 6. Create the directory upon which you will mount the floppy based
  606.    filesystem, or you can use /mnt. Mount the filesystem:
  607.  
  608.           mount -r -V jfs /dev/fd0 /your_mount_point
  609.  
  610. 7. To unmount the filesystem:
  611.  
  612.           umount /dev/fd0
  613.  
  614. Since the filesystem is read-only it may be of limited use but if you
  615. are going to use it for utility programs and other data that does not
  616. change much, it may still be useful. If you need to change the data,
  617. you can copy the directory from the floppy into another directory, make
  618. your modifications, and remake the filesystem using this procedure.
  619.  
  620.  
  621. 1.113: How do I remove a committed lpp?
  622.  
  623. You can get rid of COMMITTED lpps/ptfs by installing with the force
  624. option and then rejecting the package.
  625.  
  626. AIX 4.1 users: installp has a new option, uninstall (-u) which can be
  627. used to remove lpps.
  628.  
  629.  
  630. 1.114: How can I recover space after installing updates?
  631. From: Milt Cloud <cloud@ux1.cso.uiuc.edu>
  632.  
  633. Note: If you are a /usr server, do not use this because the files
  634.       mentioned below are needed by /usr clients and cannot be deleted.
  635.  
  636. Installp creates numerous files in /usr to clean up after
  637. failed/rejected installs and also for de-installing uncommitted lpps. 
  638. Once you have COMMITted packages you can remove these files safely. 
  639. Depending on your installation activity the numbers can be significant:
  640. hundreds-to-thousands of files, megabytes of data.
  641.  
  642. Files eligible for removal are associated with each "product" you have
  643. installed; the largest collection being due to bos. After
  644. COMMITting bos lpps, you may safely remove all files of the form:
  645.  
  646.               /usr/lpp/bos/deinstl*
  647.               /usr/lpp/bos/inst_U4*
  648.               /usr/lpp/bosadt/deinstl*
  649.         and   /usr/lpp/bosadt/inst_U4*
  650.  
  651. You may repeat this for all additional COMMITted products (e.g.,
  652. bostext1, bosnet, xlc) you have on your system.
  653.  
  654. This problem of lingering install files is a known defect in installp. 
  655. If you have installed PTF U411711 (or any superseder of it: U412397,
  656. U413366, U413425) the deadwood in /usr will not be quite as prevalent. 
  657. No single PTF currently available completely corrects this problem.
  658.  
  659. On my own 320, the following freed up 12.4M in /usr:
  660.  
  661.        # rm -R /usr/lpp/bos/deinstl*
  662.        # rm -R /usr/lpp/bos/inst_U4*
  663.  
  664.  
  665. 1.115: Where are the AIX log files kept?
  666. From: dirk@kimosabi.ucsc.edu (Dirk Coldewey)
  667.  
  668. AIX logs messages as specified in /etc/syslog.conf.  Here's an
  669. example
  670.  
  671. #
  672. *.err;kern.debug;auth.notice;user.none          /dev/console
  673. *.err;kern.debug;daemon,auth.notice;mail.crit;user.none /var/adm/messages
  674. lpr.debug                                       /var/adm/lpd-errs
  675.  
  676. *.alert;kern.err;daemon.err;user.none           operator
  677. *.alert;user.none                               root
  678. *.emerg;user.none                               *
  679.  
  680. # for loghost machines, to have authentication messages (su, login, etc.)
  681. # logged to a file, un-comment out the following line and adjust the 
  682. # file name as appropriate.
  683. #
  684. # if a non-loghost machine chooses to have such messages 
  685. # sent to the loghost machine, un-comment out the following line.
  686. #
  687. auth.notice                     /var/log/authlog
  688. mail.debug                      /var/log/syslog
  689.  
  690. # following line for compatibility with old sendmails. they will send
  691. # messages with no facility code, which will be turned into "user" messages
  692. # by the local syslog daemon. only the "loghost" machine needs the following
  693. # line, to cause these old sendmail log messages to be logged in the
  694. # mail syslog file.
  695. #
  696. user.alert                       /var/log/syslog
  697. #
  698. # non-loghost machines will use the following lines to cause "user"
  699. # log messages to be logged locally.
  700. #
  701. user.err                         /dev/console
  702. user.err                         /var/adm/messages
  703. user.alert                       `root, operator'
  704. user.emerg                       *
  705.  
  706.  
  707. 1.116: How can I log information about ftp accesses to a file?
  708. From: elr@trintex.uucp (Ed Ravin) and
  709.       map@hal.maths.monash.edu.au (Michael Page)
  710.  
  711. 1) In /etc/syslog.conf, add the line:
  712.    daemon.debug        /tmp/daemon.log
  713.  
  714. 2) # touch  /tmp/daemon.log
  715.    # refresh -s syslogd
  716.  
  717. 3) Modify your inetd.conf so that ftpd is called with the "-l" flag.
  718.    You may also want the "-d" flag. This can be done with 'smit inetdconf'.
  719.  
  720. All the syslog messages from various system daemons should now appear in
  721. the file "/tmp/daemon.log".
  722.  
  723.  
  724. 1.117: How do I find a file name from the inode number?
  725. From: svpillay@berlioz.crs4.it (Kanthan Pillay)
  726.  
  727.      find /mntpoint -xdev -inum nnnn -print
  728.  
  729.  
  730. 1.118: How do I set up postscript accounting?
  731. From: taluskie@utpapa.ph.utexas.edu (Vince Taluskie)
  732.  
  733. Ephraim Vider originally wrote this program to configure postscript page
  734. accounting. It acts as a backend wrapper which logs accounting
  735. information in /etc/qconfig and can be ftp'd from utpapa.ph.utexas.edu
  736. in /pub/aix/psacct.tar.Z.
  737.  
  738. Compile with:
  739.  
  740. cc  pswrap.c -o pswrap -lqb
  741.  
  742. and then make this program suid root:
  743.  
  744. chown root pswrap
  745. chmod u+s pswrap
  746.  
  747. If this step is not done, the printer will hang.
  748.  
  749. Then start up SMIT and go to :
  750.  
  751. Spooler
  752.   Manage Local Printer Subsystem
  753.     Local Printer Queue Devices
  754.       Change / Show Characteristics of a Queue Device
  755.         <Select Queue>
  756.           <Select Device>
  757.  
  758. and change "BACKEND PROGRAM pathname" to the full pathname of pswrap
  759. since pswrap will now handle the backend interface with the queue.
  760.  
  761. A stream of info will be written to a logfile in /tmp (prob lp0.log) but
  762. this file is mainly used for status info and raw pagecounts. If the
  763. accounting data is going to the qconfig-specified acctfile, then use the
  764. 'pac' command to read it. I prefer to have readable ascii data files
  765. instead, so I just comment out the '#define WANT_PAC' line and it will
  766. only go to the ACCTFILE specfied in pswrap.c.
  767.  
  768. /*  pswrap.c
  769.  
  770.  compile with:   cc pswrap.c -o pswrap -lqb
  771.  (for doc on the qb library see "understanding backend routines in libqb")
  772.  
  773.  BTW:  The log_charge() function doesn't seem to do anything,
  774.        but log_pages() updates the accounting info.
  775.  
  776. Ephraim Vider, original author 
  777.  
  778. --
  779. Feb 10, 1993
  780.  
  781. You can set pswrap up to use either the accounting file specified in
  782. /etc/qconfig (which means that you need to get your data from 'pac') or
  783. you can comment out the #define WANT_PAC line and then the accounting
  784. data will only go into the ACCTFILE.
  785.  
  786. Also modified the logging to the ASCII acctfile so that it looks more
  787. readable.
  788.  
  789. Vince Taluskie
  790. */
  791.  
  792.  #include <stdio.h>
  793.  #include <string.h>
  794.  #include <ctype.h>
  795.  #include <fcntl.h>
  796.  #include <signal.h>
  797.  #include <setjmp.h>
  798.  #include <sys/wait.h>
  799.  #include <IN/backend.h>
  800.  #include <IN/standard.h>
  801.  #include "qprocs.h"
  802.  
  803.  char     *nextword (char *p);
  804.  char     *skipvalue (char *p);
  805.  
  806.  #define LOGDIR     "/tmp"
  807.  #define ACCTFILE   "/usr/adm/acct/lpr/ps-acct"
  808. /* #define WANT_PAC     1 */     /* this define will also send accounting
  809.                                  info to the acctfile specified in
  810.                  /etc/qconfig file.  If this define is 
  811.                  commented out then accounting info will
  812.                  only go to ACCTFILE  */
  813.  
  814.  
  815.  char     pcprog[] = "statusdict begin pagecount = end\n\x04";
  816.  
  817.  char     *keyw[] = {
  818.      "idle",
  819.      "busy",
  820.      "waiting",
  821.      "printing",
  822.      "initializing",
  823.      NULL
  824.  };
  825.  enum     { PS_IDLE, PS_BUSY, PS_WAIT, PS_PRINT, PS_INIT, PS_UNKNOWN };
  826.  
  827.  void     giveup();
  828.  jmp_buf  jumper;
  829.  
  830.  char     logfname[30];
  831.  FILE     *logfile, *acctfile;
  832.  
  833.  main (argc, argv)
  834.  int argc;
  835.  char     *argv[];
  836.  {
  837.      char *devname;
  838.      int  pagcnt, c;
  839.      int  pid;
  840.      int  w, status;
  841.  
  842.      if (argc < 2) {
  843.           fprintf(stderr, "Usage: psbe file\n");
  844.           exit(-1);
  845.      }
  846.      if (log_init(argv[1]) < 0) {
  847.           fprintf(stderr, "log_init failed!\n");
  848.           exit(EXITBAD);
  849.      }
  850.      sprintf(logfname, "%s/%s.log", LOGDIR, get_device_name());
  851.      if ((logfile = fopen(logfname, "a")) == NULL) {
  852.           fprintf(stderr, "Can't open logfile.\n");
  853.           exit(EXITBAD);
  854.      }
  855.  
  856.      if ((acctfile = fopen(ACCTFILE, "a")) == NULL) {
  857.      fprintf(stderr, "Can't open logfile.\n");
  858.      exit(EXITBAD);
  859.      }
  860.  
  861.      setvbuf(logfile, NULL, _IOLBF, BUFSIZ);
  862.      setvbuf(acctfile, NULL, _IOLBF, BUFSIZ);
  863.  
  864.      setvbuf(stdin, NULL, _IONBF, 0);
  865.      setvbuf(stdout, NULL, _IONBF, 0);
  866.      fprintf(logfile, "start Job no. %d, queued on %s\n", get_job_number(),
  867.                get_qdate());
  868.      log_status(WAITING);
  869.      pagcnt = getpagecnt();
  870.      log_status(RUNNING);
  871.      if ((pid = fork()) < 0) {
  872.           perror("fork");
  873.           exit(EXITBAD);
  874.      }
  875.      if (pid == 0) {
  876.           argv[0] = "piobe";
  877.           execv("/usr/lpd/piobe", argv);
  878.           perror("exec");
  879.           exit(EXITBAD);
  880.      }
  881.      while ((w = wait(&status)) != pid)
  882.           if (w == -1) {
  883.                perror("wait");
  884.                exit(EXITBAD);
  885.           }
  886.      if (WEXITSTATUS(status) != 0)
  887.           exit(WEXITSTATUS(status));
  888.      log_status(WAITING);
  889.  
  890.      if (pagcnt > 0 && (c = getpagecnt()) > 0) {
  891. #ifdef WANT_PAC 
  892.           log_pages(c - pagcnt);
  893. #endif
  894.     }
  895.  
  896.      fprintf(logfile, "end Job no. %d, queued on %s\n", get_job_number(),
  897.                get_qdate());
  898.  
  899. /* the accounting file format is 
  900.  
  901. pages_printed     user     queue_printed_on   time_queued
  902.  
  903. */
  904.  
  905.      fprintf(acctfile, "%d %35s %7s    %s \n", (c - pagcnt), get_from(), get_queue_name(), get_qdate());
  906.  
  907.      fclose(logfile);
  908.      fclose(acctfile);
  909.      exit(EXITOK);
  910.  }
  911.  
  912.  void     giveup ()
  913.  {
  914.      longjmp(jumper, 1);
  915.  }
  916.  
  917.  getpagecnt ()
  918.  {
  919.      int  pc = 0, pstat;
  920.      char buf[81];
  921.  
  922.      if (setjmp(jumper) != 0) {
  923.           fprintf(logfile, "giving up on status\n");
  924.           return (0);
  925.      }
  926.      alarm(60 * 2);
  927.      signal(SIGALRM, giveup);
  928.      do {
  929.           if (!gets(buf)) {
  930.                sleep(5);
  931.                putchar('\x14');    /* ^T returns status */
  932.                sleep(1); /* wait for answer from printer */
  933.                if (!gets(buf))
  934.                     return (0);
  935.           }
  936.           fprintf(logfile, "%s\n", buf);
  937.           if ((pstat = getstatus(buf)) == PS_WAIT) {
  938.                putchar('\x04');
  939.                sleep(1);
  940.           }
  941.      } while (pstat != PS_IDLE);
  942.      alarm(0);
  943.      while (gets(buf))
  944.           fprintf(logfile, "%s\n", buf);
  945.      printf("%s", pcprog);
  946.      sleep(1); /* wait for answer from printer */
  947.      if (!gets(buf))
  948.           return (0);
  949.      if (sscanf(buf, "%d", &pc) != 1)
  950.           return (0);
  951.      fprintf(logfile, "%d\n", pc);
  952.      return (pc);
  953.  }
  954.  
  955.  /*
  956.   * Parser for printer status messages
  957.   */
  958.  
  959.  getstatus (p)
  960.  char     *p;
  961.  {
  962.      char *t;
  963.      int  i;
  964.  
  965.      if ((p = strchr(p, '%')) == NULL)
  966.           return (PS_UNKNOWN);
  967.      if (strncmp(p, "%%[", 3) != 0)
  968.           return (PS_UNKNOWN);
  969.      for (p = nextword(p + 3) ; p != NULL ; p = skipvalue(p)) {
  970.           t = p;
  971.           p = strchr(p, ':');
  972.           *p++ = '\0';
  973.           p = nextword(p);
  974.           if (strcmp(t, "status") == 0)
  975.                break;
  976.      }
  977.      if (p == NULL)
  978.           return (PS_UNKNOWN);
  979.      t = p;
  980.      p = strchr(p, ' ');
  981.      if (p[-1] == ';')
  982.           p--;
  983.      *p = '\0';
  984.      for (i = 0 ; keyw[i] != NULL ; i++)
  985.           if (strcmp(t, keyw[i]) == 0)
  986.                break;
  987.      return (i);
  988.  }
  989.  
  990.  char     *nextword (p)
  991.  char     *p;
  992.  {
  993.      while (isspace(*p))
  994.           p++;
  995.      if (strncmp(p, "]%%", 3) == 0)
  996.           return (NULL);
  997.      return (p);
  998.  }
  999.  
  1000.  char     *skipvalue (p)
  1001.  char     *p;
  1002.  {
  1003.      char *t;
  1004.  
  1005.      while (p != NULL) {
  1006.           p = strchr(p, ' ');
  1007.           t = p;
  1008.           p = nextword(p);
  1009.           if (t[-1] == ';')
  1010.                break;
  1011.      }
  1012.      return (p);
  1013.  }
  1014.  
  1015.  /*********    qprocs.h    ***********/
  1016.  /* functions for communication between qdaemon and the backend */
  1017.  
  1018.  char     *get_from();
  1019.  char     *get_to();
  1020.  char     *get_qdate();
  1021.  char     *get_queue_name();
  1022.  char     *get_device_name();
  1023.  char     *get_title();
  1024.  
  1025.  
  1026. 1.119: How do I create boot diskettes for 3.2?
  1027.  
  1028. You need to have four formatted diskettes.
  1029.  
  1030. boot disk:                bosboot -d /dev/fd0 -a
  1031. display disk:             mkdispdskt
  1032. display extension disk:   mkextdskt
  1033. Install/Maintenance disk: mkinstdskt
  1034.  
  1035.  
  1036. 1.120: Where can I find tools for performance monitoring?
  1037.  
  1038. Free X based performance watcher: xsysstats - ftp site ftp.x.org:/contrib
  1039.  
  1040. For 3.2 a few tools are available in /usr/lpp/bosperf. There are tools
  1041. to monitor traces, I/O events, CPU, virtual memory, disk block usage,
  1042. kernel extensions, etc. It even has a simulator, rmss, that allows one
  1043. to try out different memory size configurations to see how it impacts
  1044. performance. See 6.05 for the AIX Performance and Tuning Guide.
  1045.  
  1046. Monitor is an excellent tty based program that includes:
  1047.  
  1048.  - cpu usage
  1049.  - load average (from kernel or by using loadavgd program)
  1050.  - virtual and real memory usage
  1051.  - paging information
  1052.  - process events
  1053.  - Disk I/O (summary and TOP disks 1.12)
  1054.  - TTY I/O
  1055.  - Network activity
  1056.  - top cpu users 
  1057.  - NFS operations (New to 1.11)
  1058.  - more detailed disk I/O screen (New to 1.11 with -disk option)
  1059.  - more detailed network I/O screen (New to 1.12 with -net option)
  1060.  - toggle between normal/top/net/disk display using t,n,d keys
  1061.  
  1062. Monitor is available from
  1063. ftp.funet.fi:pub/unix/AIX/RS6000/monitor-1.11.tar.Z
  1064.  
  1065.  
  1066. 1.121: How can I tell what virtual printer a print queue is using?
  1067. From: yoder@austin.ibm.com (Stuart R. Yoder)
  1068.  
  1069. Use the command 'lsvirprt'. Don't use any parameters and it will
  1070. run in an interactive mode that will give you a menu of all virtual
  1071. printers on the system with the queue and device for each one.
  1072.  
  1073.  
  1074. 1.122: Two srcmstr's are less useful than one?
  1075. From: hubert@rs530.ncs.mainz.ibm.com (Bernhard Zeller)
  1076.  
  1077. This can happen on systems that have no console, or systems with an
  1078. async terminal as the console but not attached or turned off. One of the
  1079. symptoms is a second srcmstr got run. But the second srcmstr is worthless
  1080. as we can't use the stop/startsrc commands, refresh inetd, qdaemon won't
  1081. start, etc.
  1082.  
  1083. To resolve this, type:
  1084.  
  1085.     smit chgtty
  1086.  
  1087. and add the keyword 'clocal' in following lines:
  1088.  
  1089.    STTY attributes for RUN TIME
  1090.    STTY attributes for LOGIN
  1091.  
  1092.  
  1093. 1.123: How do I set the tty name associated with a physical port?
  1094. From: accapadi@mathew.austin.ibm.com (Matt Accapadi)
  1095.  
  1096. Let's say you wanted to make a tty on the s1 port and call it rs0000
  1097. and a tty on the s2 port and call it rs0001.
  1098.  
  1099. You could run:
  1100.  
  1101. mkdev -c tty -s rs232 -t tty -l rs0000 -p sa0 -w s1   # creates rs0000
  1102. and
  1103. mkdev -c tty -s rs232 -t tty -l rs0001 -p sa1 -w s2   # creates rs0001
  1104.  
  1105.  
  1106. 1.124: How do I use mksysb to clone a system?
  1107. From: joann@ariadne.SLAC.Stanford.EDU (Jo Ann Malina)
  1108.  
  1109. I use the following steps on the master machine to clone an AIX system:
  1110. 1) Remove the password from root.
  1111. 2) Remove the NIS line from the end of the /etc/group file (the last
  1112.    line with the +: )
  1113. 3) Change most of the level '2' designations in /etc/inittab to level
  1114.    '3' to prevent them from being started up when the new system is
  1115.    booted (the minimum ones to change are rc.nfs and rc.tcpip)
  1116. 4) Boot in service mode and change the name and ip address to a "spare"
  1117.    set to avoid address collision.
  1118. 5) Clear /tmp, /usr/tmp and /usr/spool/lpd/stat.
  1119. 6) Run mkszfile and edit it to be sure /usr is as small as possible;
  1120.    then mksysb from the command line.
  1121.  
  1122. The above changes allow me to boot in normal mode the first time, get in
  1123. as root, change the above files back and do the other things necessary
  1124. to configure the new system.
  1125.  
  1126. Then, of course, I go back and clean up and reboot my master machine.
  1127.  
  1128. Note: 1 and 2 lets you log in even if you can't get on the network. 
  1129.    It prevents the login process from trying to reach an NIS server. 
  1130.    Step 2 needed only if you use NIS.
  1131.  
  1132.  
  1133. 1.125: How do I retain timestamps with mksysb?
  1134. Originally From: graeme@ccu1.aukuni.ac.nz ( Graeme Moffat)
  1135.  
  1136. As of AIX 3.2.5 bosrest preserves timestamps and permissions as does pax.
  1137.  
  1138. In AIX 3.2.2 /usr/lpp/bosinst/bosnet (for net installs), and bosrest
  1139. (tape), the 'pax' commands all have '-pmop' options.  m = "DON'T
  1140. retain modification times".  So, simply change all the '-pmop' to
  1141. '-pop' and remake inst/maint diskettes or mksysb tapes.
  1142.  
  1143.  
  1144. 1.126: How can I find out the machine type?
  1145. From: umar@compsci.cas.vanderbilt.edu (Sait Umar)
  1146.  
  1147. #!/bin/sh
  1148. #
  1149. #  Author G. Vitillaro              (peppe@ipgaix.unipg.it)
  1150. #  from an idea of Marc Pawliger    (marc@ibmpa.awdpa.ibm.com)
  1151. #
  1152. #  10/12/92  GVT  First (and last) implementation
  1153. #
  1154. # machine : will get machine type on RISC/6000
  1155. #
  1156. #
  1157. awk '
  1158.         BEGIN {
  1159.                 m["10"]="7013/530 or 7016/730";
  1160.                 m["11"]="7013/540";
  1161.                 m["14"]="7013/540";
  1162.                 m["18"]="7013/530H";
  1163.                 m["1C"]="7013/550";
  1164.                 m["20"]="7015/930";
  1165.                 m["2E"]="7015/950";
  1166.                 m["2E"]="7015/950E";
  1167.                 m["30"]="7013/520";
  1168.                 m["31"]="7012/320";
  1169.                 m["34"]="7013/520H";
  1170.                 m["35"]="7012/320H or 320E";
  1171.                 m["37"]="7012/340";
  1172.                 m["38"]="7012/350";
  1173.                 m["41"]="7011/220";
  1174.                 m["43"]="7011/M20";
  1175.                 m["46"]="250/PowerPC";
  1176.                 m["47"]="230/RSC";
  1177.                 m["57"]="7012/390";
  1178.                 m["5C"]="7013/560";
  1179.                 m["63"]="7015/970";
  1180.                 m["64"]="7015/980";
  1181.                 m["66"]="7015/580";
  1182.                 m["67"]="7015/570";
  1183.         m["70"]="590/POWER2";
  1184.             m["71"]="580H";
  1185.                 m["75"]="7012/370, 375, or 37T";
  1186.                 m["76"]="7012/360, 365, or 36T";
  1187.                 m["77"]="7012/350, 355, or 7013/550L";
  1188.                 m["78"]="7012/315 or 7013/510 ";
  1189.             m["80"]="990/POWER2";
  1190.  
  1191.     You should request anyone with a model N40 run 'uname -m | cut -c9-10'
  1192.     so you can add an entry for it.
  1193.                 if ( m[code] != "" )
  1194.                         print "This RISC/6000 is a " m[code];
  1195.                 else
  1196.                         print "Unknown Machine";
  1197.         }
  1198. ' code=`uname -m | cut -c9-10` < /dev/null
  1199.  
  1200.  
  1201. 1.127: Updating to 3.2.5
  1202. From: kraemerf@franvm3.VNET.IBM.COM (Frank Kraemer)
  1203.  
  1204. (Ed.  The following is useful if you have to update a large number of
  1205. systems, large being > 3.)
  1206.  
  1207.    *** WARNING : Modify the scripts if you need dataless, diskless   ***
  1208.    ***           or remote /usr support.                             ***
  1209.  
  1210. 1) Receive the PMP3250 tape from your AIX support center the PTF number
  1211.    is U493250.
  1212.  
  1213. 2) Create a filesystem with 240 MB of space (60 PP's) and mount it as
  1214.  
  1215.    /dev/pmp3250  -  /pub/pmp3250
  1216.  
  1217. 3) Insert the tape (blocksize is 512) and install PTF U422467
  1218.  
  1219.    # installp -BXacgq -d /dev/rmt0 bos.obj 3.2.0.0.U422467
  1220.  
  1221. 4) Use the following script to load the tape in the new filesystem
  1222.  
  1223.    # cd /pub/pmp3250
  1224.    # mktape2disk.sh 0 447             <<-- read 447 files from rmt0
  1225.  
  1226. =-=-=-=-=-=-=-= cut here =-=-=-=-=-=-=-=-=-=-=
  1227. #!/bin/ksh
  1228. # @(#) mktape2disk.sh  creates files from tape on disk.
  1229.  
  1230. # change name prefix here
  1231. NAME="f"
  1232.  
  1233. # from file #i to file #j
  1234. integer i=1
  1235. integer j
  1236.  
  1237. # test arguments
  1238. if [ -z "${1}" ]
  1239. then
  1240.   echo "\nusage: $(basename ${0}) <drive_no> <#files>\n"
  1241.   echo "\t<drive_no>: tape drive number (e.g. 0)"
  1242.   echo "\t<#files>  : number of files to copy from the tape\n"
  1243.   exit 1
  1244. fi
  1245. device=/dev/rmt${1}.1
  1246.  
  1247. # test arguments
  1248. if [ -z "${2}" ]
  1249. then
  1250.   echo "\nusage: $(basename ${0}) <drive_no> <#files>\n"
  1251.   echo "\t<drive_no>: tape drive number (e.g. 0)"
  1252.   echo "\t<#files>  : number of files to copy from the tape\n"
  1253.   exit 1
  1254. fi
  1255. j=${2}
  1256.  
  1257. tctl -f ${device} rewind
  1258. if [ $? -ne 0 ]
  1259. then
  1260.   exit 1
  1261. fi
  1262.  
  1263. # create tape
  1264. while [ ${i} -le ${j} ]
  1265. do
  1266.     echo "Copy file #${i} of #${j} from (${device}) to disk as (${NAME}${i})."
  1267.     dd if=${device} of="${NAME}${i}" bs=200k
  1268.     i=i+1
  1269. done
  1270. tctl -f ${device} rewind
  1271. exit 0
  1272. =-=-=-=-=-=-=-= cut here =-=-=-=-=-=-=-=-=-=-=
  1273.  
  1274. 5) Create a new .toc file
  1275.  
  1276.    # cd /pub/pmp3250
  1277.    # inutoc .
  1278.    # pg .toc
  1279.  
  1280. 6) Place the following file named 'runme.sh' in the PMP directory
  1281.  
  1282. =-=-=-=-=-=-=-= cut here =-=-=-=-=-=-=-=-=-=-=
  1283. #!/bin/ksh
  1284. # @(#) runme.sh for PMP3250
  1285. #
  1286. INSTP="/usr/sbin/installp"
  1287. LOG="/tmp/installp.log"
  1288. TEE="/usr/bin/tee"
  1289. PATCHDIR=$(pwd)
  1290. #
  1291. /usr/bin/cp /usr/lpp/info/data/ispaths /usr/lpp/info/data/ispaths.save
  1292. #
  1293. INFODIR="/usr/lpp/info/$LANG/aixmin"
  1294. /usr/bin/mkdir ${INFODIR} 2>/dev/null >/dev/null
  1295. if [ ! -w ${INFODIR} ]
  1296. then
  1297.     print "\n\t*ERROR* Can not (write) access [${INFODIR}]."
  1298.     print "\tPlease unmount CD or NFS filesystems.\n"
  1299.     exit -1
  1300. fi
  1301. #
  1302. # Commit all ptf's
  1303. #
  1304. ${INSTP} -Xc all 2>&1 | ${TEE} ${LOG}.0
  1305. #
  1306. # Install latest installp patch
  1307. #
  1308. ${INSTP} -BXacgq -d ${PATCHDIR} bos.obj 3.2.0.0.U422463 2>&1 | ${TEE} ${LOG}.1
  1309. #
  1310. # Install latest installp patch
  1311. #
  1312. ${INSTP} -BXacgq -d ${PATCHDIR} bos.obj 3.2.0.0.U422467 2>&1 | ${TEE} ${LOG}.6
  1313. #
  1314. # Run the ptfdir clean utility.
  1315. #
  1316. /usr/sbin/ptfdir_clean -y -f -v 2>&1 | ${TEE} ${LOG}.2
  1317. #
  1318. # Install the PMP.    Version 1
  1319. #
  1320. /usr/lib/instl/sm_inst installp_cmd   \
  1321.         -T m -q -a -g -B              \
  1322.         -d ${PATCHDIR}                \
  1323.         -S '3250 AIX Maintenance Level U493250' \
  1324.         -c  -N  -X                    \
  1325.         2>&1 | ${TEE} ${LOG}.3
  1326. #
  1327. # Install the PMP.    Version 2
  1328. #
  1329. # /usr/sbin/update_all
  1330. #
  1331. # Install latest installp patch
  1332. #
  1333. /usr/bin/lppchk -v | ${TEE} ${LOG}.4
  1334. #
  1335. # Show level of installp patch
  1336. #
  1337. /usr/bin/lslpp -m bos.obj | ${TEE} ${LOG}.5
  1338. #
  1339. # Guess you should reboot now.
  1340. #
  1341. sync;sync
  1342. print - "\n\n\tDone......guess you should reboot now !!\n"
  1343. exit 0
  1344. =-=-=-=-=-=-=-= cut here =-=-=-=-=-=-=-=-=-=-=
  1345.  
  1346. 7) To run the update on your server
  1347.  
  1348.    ===>> Please read the Installation Instructions first <<==
  1349.  
  1350.    # cd /pub/pmp3250
  1351.    # ./runme.sh
  1352.  
  1353.                    ........WAIT...........
  1354.  
  1355.    # /etc/shutdown -Fr
  1356.  
  1357. 8) NFS export the PMP dir as READ-ONLY to all your clients.
  1358.  
  1359. 9) To update a client system
  1360.  
  1361.     a -  Mount the PMP filesystem from the server
  1362.     b -  cd <mounted_filesystem>
  1363.     c -  execute ./runme.sh
  1364.     d -  Unmount PMP filesystem
  1365.     e -  reboot
  1366.  
  1367. 10) To create a copy 1:1 of the tape you received use the script 'mktape.sh'
  1368.  
  1369.    # cd /pub/pmp3250
  1370.    # mktape.sh 0
  1371.  
  1372. =-=-=-=-=-=-=-= cut here =-=-=-=-=-=-=-=-=-=-=
  1373. #!/bin/ksh
  1374. # @(#) mktape.sh: creates a bootable tape from images on disk
  1375.  
  1376. # change name prefix here
  1377. NAME="f"
  1378.  
  1379. # usage: mktape drive_no
  1380. #        drive_no = tape drive number
  1381. # test arguments
  1382. if [ -z "${1}" ]
  1383. then
  1384.   echo "\nusage: mktape <drive_no>"
  1385.   echo "         <drive_no>: tape drive number (e.g. 0)\n"
  1386.   exit 1
  1387. fi
  1388. device=/dev/rmt${1}.1
  1389.  
  1390. tctl -f ${device} rewind
  1391. if [ $? -ne 0 ]
  1392. then
  1393.   exit 1
  1394. fi
  1395.  
  1396. # create tape
  1397. i=1
  1398. while test -r "${NAME}${i}"
  1399. do
  1400.     echo "copy ${i}"
  1401.     if [ $i -le 3 ]
  1402.     then
  1403.       dd if="${NAME}${i}" of=${device} conv=sync bs=1k
  1404.     else
  1405.       dd if="${NAME}${i}" of=${device} bs=200k
  1406.     fi
  1407.     let i=${i}+1
  1408. done
  1409. tctl -f ${device} rewind
  1410. exit 0
  1411.  
  1412.  
  1413. 1.128: AIX fix strategy
  1414. From: leedp@austin.ibm.com (Dennis Lee, PMP Release Manager)
  1415.  
  1416. First, a little history...
  1417.  
  1418. The maintenance strategy for AIX 3.1 was cumulative updates. Every few
  1419. months, we'd put all available fixes in one large package and ship it. 
  1420. There was no real strategy for providing a single fix. Although we'd
  1421. occasionally produce an emergency patch, there was no method for
  1422. tracking them; if you got a second one, it might overwrite the first. 
  1423. So, after a few of these patches, it's hard to track.
  1424.  
  1425. In AIX 3.2 we introduced a "selective fix" strategy to support
  1426. individual fixes. The package contained information about other fixes
  1427. that were required for that fix to work correctly. For example, a Korn
  1428. shell fix might require a change in libc.a, which might in turn require
  1429. a fix in the kernel. This strategy allowed us to keep track of which
  1430. fixes were installed to make sure we didn't overwrite one with another,
  1431. and make sure they all worked together. But the initial selective fix
  1432. design still had a few problems.
  1433.  
  1434.   o None of the fixes were cumulative.  If you got a fix for Korn shell,
  1435.     you may not receive all of the fixes for Korn shell.  This left the
  1436.     possibility of rediscovering other problems that were already fixed.
  1437.  
  1438.   o Since we chose to fix everything possible that was reported as a
  1439.     problem, instead of deferring them to the next release, the number
  1440.     of available fixes became quite large.
  1441.  
  1442.   o The number of additional fixes required by any given fix could also
  1443.     be quite large.  Since the installation program ran once for each
  1444.     fix, the size and complexity of the fix packages grew, and
  1445.     installation time lengthens greatly.
  1446.  
  1447. While developing the AIX 3.2.4 upgrade, we undertook a large effort to
  1448. resolve the selective fix concerns, and dramatically increase the
  1449. quality of AIX 3.2.  The base operating system and most of the optional
  1450. program products were split into subsystems.  A subsystem is a group of
  1451. logically related files.  The division was made such that changes to a
  1452. given subsystem were less likely to affect other subsystems.  In total
  1453. there are approximately 500 subsystems, but in practice, files have been
  1454. modified in only about half of them.  The advantages of the new
  1455. packaging strategy are:
  1456.  
  1457.   o Each subsystem package is cumulative, containing all of the fixes
  1458.     and enhancements to date for that subsystem.
  1459.  
  1460.   o The cumulative subsystem package is tested as an entity.
  1461.  
  1462.   o The number of fix packages is greatly reduced because the number of
  1463.     subsystems is far fewer than the number of fixes and enhancements.
  1464.  
  1465.   o The number of other fixes required by any given fix is also greatly
  1466.     reduced because a subsystem package has requisites only on other
  1467.     subsystem packages.
  1468.  
  1469.   o The reduced number of fix packages greatly reduced installation time.
  1470.  
  1471. Some customers also told us that they liked the maintenance level
  1472. strategy that we used in AIX 3.1.  They liked being able to install all
  1473. of the known fixes, and they liked knowing what "level" of AIX they had. 
  1474. To meet these requirements, we produced a Preventive Maintenance Package
  1475. (PMP).  The PMP is simply a collection of the latest cumulative
  1476. subsystem packages tied together in such a way that it can be installed
  1477. by selecting a single fix.  We also added flags to the lslpp command and
  1478. added a new command, oslevel, to show which PMP is installed.  Now we
  1479. had both! The good attributes of selective fix along with the good
  1480. attributes of maintenance levels. 
  1481.  
  1482. A few Q&As: 
  1483.  
  1484. Q. Why is the fix I just received 130 megabytes!@#? I already have the
  1485. AIX 3.2.4 update installed!
  1486. A. Your fix may be part of the AIX 3.2.5 update. AIX 3.2.5 is another
  1487. PMP that contains all of the fixes to date, as well as enhancements 
  1488. to support the PowerPC model 250, and the new high-end RS/2 models
  1489. 590 and 990, as well as support for new disk and tape drives, graphics
  1490. adapters and more.
  1491.  
  1492. Q. Why can't you just build my fix on 3.2.4? 
  1493. A. There really isn't such a thing as 3.2.1 or 3.2.2 or even 3.2.4. 
  1494. They're just collections of fixes and enhancements built on a 3.2 base. 
  1495. If the fix for your problem was built prior to 3.2.5, you can get the
  1496. older version. But if your fix was built for the first time in a 3.2.5
  1497. subsystem, that's the only version of the fix that exists.
  1498.  
  1499. See also 6.02.
  1500.  
  1501.  
  1502. 1.129: Are passwords limited to 8 char?
  1503.  
  1504. AIX passwords are only significant to 8 characters. You can set a
  1505. passwd to more than 8 characters but anything over eight are ignored.
  1506. No messages or warnings are given.
  1507.  
  1508. Be careful if you're running NIS. You probably want to limit passwords
  1509. to 8 char on all machines (6000 and others) to be compatible.
  1510.  
  1511. Someone mentioned that DCE supports kerberos which supports passwords
  1512. greater than 8 characters.
  1513.  
  1514.  
  1515. 1.130: How do I increase the number of ptys > 64?
  1516. From: mick@oahu.cern.ch (Mickey Coggins)
  1517.  
  1518. SMIT only allows 64. Try this:
  1519.  
  1520. odmget -q"attribute=num and uniquetype=pty/pty/pty" PdAt |
  1521. sed "s/0-64/0-512/" |
  1522. odmchange -q"attribute=num and uniquetype=pty/pty/pty" -o PdAt
  1523.  
  1524. chdev -l pty0 -anum=256 -P
  1525. reboot
  1526.  
  1527.  
  1528. 1.131: CERT advisories on sendmail and xterm
  1529.  
  1530. The following fixes are available for some CERT advisories on problems
  1531. with sendmail and xterm.
  1532.  
  1533. sendmail        - fix available as U426396
  1534. xterm for X11R4 - fix available as U422575
  1535. xterm for X11R5 - fix available as U425811
  1536.  
  1537. 1.132: How do I remove a non-existant physical volume?
  1538. Thanks to Johnny Shieh (shieh@austin.ibm.com)
  1539.  
  1540. To delete a phantom disk from the ODM use reducevg with the pvid
  1541. instead of the disk name.  You are running some command such as lsvg
  1542. or varyonvg and it is griping about a disk that is no longer findable
  1543. right?  In that warning message, it should give you a pvid.  Then
  1544. simply:
  1545.  
  1546. reducevg -f <pvid>
  1547.  
  1548.  
  1549. 1.133  How do I kill a process that ignores kill -QUIT -KILL -STOP
  1550.  
  1551. If there is i/o pending in a device driver, and the driver does not
  1552. catch the signal, you can't kill it - a reboot is the only way to
  1553. clear it.
  1554.  
  1555. Furthermore, if the process stays hung for more than a few minutes,
  1556. you can find out what device is wedged by doing this --
  1557.  
  1558. % echo trace -k $(expr <pid> / 256) | crash | tee stack
  1559.  
  1560. If you can't figure out what is wrong, print that trace out and call
  1561. 1-800-237-5511 and tell them that something is broken.  Tell them you
  1562. want to fax in the nice stack trace that you have as your testcase.
  1563.  
  1564.  
  1565. 1.134: How can I see "console" messages?
  1566. From: crow@tivoli.com (David L. Crow)
  1567.  
  1568. Use the swcons command to redirect the console to a file.  Or use
  1569. chcons to do it permanently.
  1570.  
  1571.  
  1572. 1.135: Where can I find TOP for AIX?
  1573.  
  1574. TOP functionality is included in an AIX package called Monitor
  1575. availible from aixpdslib.seas.ucla.edu:/pub/monitor among other
  1576. places.
  1577.  
  1578.  
  1579. 1.136: How can I restrict root logins to specific terminals?
  1580. From: jfh@austin.ibm.com (John F. Haugh II)
  1581.  
  1582. Read FAX 2737 availible from the 800-IBM-4FAX number discussed in
  1583. section 6.02.  Refer to APAR IX45701 for fixes related to the rsh style
  1584. commands. 
  1585.  
  1586.  
  1587. 1.137: How do I merge my /etc/password and /etc/security/password for Crack
  1588.  
  1589. /usr/sbin/mrgpwd.  You must have permissions to read /etc/security/password.
  1590.  
  1591.  
  1592. 1.138: I lost the root password, what should I do?
  1593. (From: [a posting by] dramm@csusm.edu (Donald E. Ramm))
  1594.  
  1595. Boot from boot diskettes, bootable tape, or bootable CD.  
  1596. At the Installation/Maint menu select item 4, "Start a limited function
  1597.     maintenance shell.
  1598. At the subsequent "#" prompt enter the command:
  1599.     getrootfs hdiskN
  1600.     (where "N" is replaced by the number of a disk on your system
  1601.     that is in rootvg.)
  1602. That will run for about a minute or so and you get a # prompt back.  At this
  1603.     point you are logged in as root in single user mode.
  1604. Change to /etc/security and edit the passwd file.  Delete the three lines
  1605.     under root: password, update time (or whatever it's called), and
  1606.     flags.  Save the file.
  1607. Then at the prompt, give root a new password.
  1608. Shutdown/reboot in normal mode.  Log in with new password.
  1609.  
  1610.  
  1611. 1.140: SMIT problems forcing/overwriting install?
  1612.  
  1613. Installp does not support overwriting and installing prerequisite
  1614. software at the same time.
  1615.  
  1616.  
  1617. 1.200: Some info about tape backups
  1618. From: Craig Anderson
  1619.  
  1620. The following supplements the information on rmt devices in
  1621. InfoExplorer. It is based on my own personal experience with IBM tape
  1622. drives running on AIX 3.1. No warranty is expressed or implied.
  1623.  
  1624. CONFIGURING THROUGH SMIT:
  1625.     BLOCK size (0=variable length)        (ALL)
  1626.     Sets the tape block size.  When reading, the block size must be
  1627.     set to the block size set when the tape was written.  When
  1628.     using some commands, tapes written with ANY block size can be
  1629.     read if the block size is set to 0 (variable length) (see
  1630.     "BLOCK SIZES" below).
  1631.  
  1632.     Use DEVICE BUFFERS during writes        (ALL)
  1633.     Set to yes, the device will buffer data internally on writes.
  1634.     This greatly improves performance, but under certain cases may
  1635.     be undesirable since the data is not written to tape before
  1636.     returning a good indication.
  1637.  
  1638.     Use EXTENDED file marks            (8mm only)
  1639.     Extended file marks take up much more space than short (or
  1640.     non-extended) file marks.  But extended file marks can be
  1641.     overwritten, allowing data not at the beginning of tape to be
  1642.     overwritten (see "FILE MARKS" below).
  1643.  
  1644.     RETENSION on tape change or reset        (1/4" only)
  1645.     If set to "no" then the tape will not be retentioned
  1646.     automatically when the tape is inserted.  Note that this will
  1647.     take effect only after the device is used.
  1648.  
  1649.  
  1650. FILE MARKS:
  1651.      Tape devices support multiple tape files.  Tape files are the
  1652.      result of a backup/cpio/tar/dd type command, where the device is
  1653.      opened, written to, and closed.  Because tapes allow large
  1654.      quantities of data to be written on a single tape, several backups
  1655.      (that is, tape files), may be combined on one physical tape.
  1656.      Between each tape file is a "tape file mark" or simply "file
  1657.      mark".  These file marks are used by the device driver to indicate
  1658.      where one tape file ends and another begins.
  1659.  
  1660.                               B       E
  1661.                    <-------   O       O   ------->
  1662.                               T       T
  1663.               __ ____________________________ _______________
  1664.      physical | \            |       |      \             |physical
  1665.      beginning|  \           | tape  |       \            | end
  1666.        of     |   \          | file  |        \           |  of
  1667.       tape    |    \         | mark  |         \          | tape
  1668.               |_____\________|_______|__________\_________|
  1669.  
  1670.      Note that there is a distinction between the beginning of tape
  1671.      (BOT) side of a file mark and the end of tape (EOT) side of a file
  1672.      mark.  If the head is on the BOT side of a file- mark, "tctl fsf
  1673.      1" command will move only to the EOT side of the same file mark.
  1674.  
  1675.      With the 1/4" tape drive, writing can only take place
  1676.      sequentially, or after blank tape has been detected.  You cannot
  1677.      write over data on the tape (except at BOT).  If you wish to add
  1678.      data to a tape which has been written and then rewound you should
  1679.      space forward file mark until an error occurs.  Only then can
  1680.      you start writing again.
  1681.  
  1682.      With an 8mm tape drive, writing can only take place before blank
  1683.      tape, an EXTENDED file mark, or at BOT.  Thus if several backups
  1684.      have been made on one tape and you wish to overwrite one of the
  1685.      backups, position the tape to the place you wish to start writing
  1686.      and issue the following commands:
  1687.     tctl bsf 1
  1688.     tctl eof 1
  1689.      The first command skips back to the BOT side of the same file
  1690.      mark.  The second command rewrites the file mark (writing is
  1691.      allowed before extended file marks).  The erase head will erase
  1692.      data ahead of the write head, so that after writing the file mark
  1693.      the head will be positioned before blank tape.  Only after this
  1694.      may you start writing over data in the middle of the tape.  (All
  1695.      data beyond where you are currently writing will be lost).  Note
  1696.      that you cannot write over short file marks.  In order for this to
  1697.      work, the tape must have been written with extended file marks
  1698.      (use smit to change this).
  1699.  
  1700.      With the 9-track drive writing can take place anywhere on the
  1701.      tape although overwriting single blocks of data is not supported.
  1702.  
  1703.      On the 8mm drive extended filemarks use 2.2 megabytes of tape and
  1704.      can take up to 8.5 seconds to write.  Short filemarks use 184K
  1705.      and take up to 1.5 seconds to write.
  1706.  
  1707. BLOCK SIZES:
  1708.      When data is written to tape it is written in blocks.  The blocks
  1709.      on a tape are separated by inter-record gaps.  It is important to
  1710.      understand the structure of the written tape in order to
  1711.      understand the problems which can occur with changing block
  1712.      sizes.
  1713.  
  1714.      In fixed block size mode all blocks on the tape are the same
  1715.      size.  They are the size of the block size set in the device
  1716.      configuration.  All read()s and write()s to the tape drive must be
  1717.      a multiple of the fixed block size.
  1718.  
  1719.      In fixed block mode a read() will return as many blocks as needed
  1720.      to satisfy the read() request.  If a file mark is encountered
  1721.      while reading the tape only the data up until the file mark will
  1722.      be returned.
  1723.  
  1724.      It is not possible for the tape drive to read a tape whose block
  1725.      size is not the same as the block size in the device
  1726.      configuration.  (Unless the device configuration is in variable
  1727.      size blocks.)
  1728.  
  1729.      In variable block size (0) mode, the blocks written on the tape
  1730.      are the size of the read() and write() requests to the device
  1731.      driver.  In this case, the actual block sizes on the tape can be
  1732.      changed using the options to the backup commands (tar -C, cpio -C,
  1733.      backup -C).
  1734.  
  1735.      In variable mode, read() requests greater than size of the block
  1736.      on the tape will return only the data from the next block on the
  1737.      tape.  It is this feature that allows tapes written in any block
  1738.      size (fixed or variable) to read with the dd command (the output
  1739.      from the dd command may be piped to restore, tar, or cpio for
  1740.      example.)  Note that backup, tar, and cpio cannot read all tapes
  1741.      by using a large block size because they assume there is an error
  1742.      if they get a short read().
  1743.         dd ibs=128k obs=16k if=/dev/rmt0 | ...
  1744.  
  1745.      The tape head is always positioned at an inter-record gap, file
  1746.      mark, or blank tape after reading or writing.
  1747.  
  1748.      With the 8mm tape drive, using a fixed block size which is not a
  1749.      multiple of 1K is inefficient.  The 8mm tape drive always writes
  1750.      internally in 1K blocks.  It simulates the effect of variable
  1751.      block sizes, but, for example, using a fixed block size of 512
  1752.      bytes (or using variable block size and write()ing 512 bytes at a
  1753.      time) wastes one half of the tape capacity and gives only one half
  1754.      the maximum transfer rate.
  1755.  
  1756.      To figure out a tape's actual block size try:
  1757.  
  1758.      1). Set the tape to variable block size.
  1759.      2). "dd if=<tape> of=/tmp/dummy bs=128k count=1"
  1760.      3). "ls -l /tmp/dummy"
  1761.      4). The number of bytes in "/tmp/dummy" is the physical block size.
  1762.  
  1763. EXCHANGING DATA WITH NON-UNIX AND OTHER VENDORS MACHINES:
  1764.      Many tape drives support both variable and fixed block sizes.
  1765.  
  1766.      Variable block mode writes block sizes the size of the write
  1767.      command issued (tar and backup specify this with the -b option). 
  1768.      In fixed mode, block sizes are fixed and all writes must be a
  1769.      multiple of the fixed block size.
  1770.  
  1771.      Unix often internally chops larger reads and writes up into
  1772.      manageable pieces (often 65535, 65534, or 65532 bytes) before
  1773.      doing the actual reads and writes.  This means reads and writes of
  1774.      64K bytes are often broken up into a 65535 byte record and a 1
  1775.      byte record (In fixed mode the write will fail).  Block sizes >=
  1776.      64K (-C128 and greater) should be avoided for this reason.  AIX
  1777.      does not break up read and write requests, but be aware of the
  1778.      situation on other machines.
  1779.  
  1780.      If the tape is written in an unknown block size then set the
  1781.      device configuration in smit to use variable size blocks, use the
  1782.      "dd" command with a large input block size, and pipe it to the
  1783.      restore command.  For example:
  1784.       chdev -l rmt0 -a block_size=0
  1785.       dd if=/dev/rmt0 ibs=128k obs=16k | tar -tvf-
  1786.  
  1787. Archive-name: aix-faq/part2
  1788. Last-modified: Feb 13, 1995
  1789. Version: 4.00
  1790.  
  1791.  
  1792. Version: $Id: faq.2,v 1.10 1995/01/13 05:45:02 jwarring Exp jwarring $
  1793.  
  1794. Frequently Asked Questions to AIX 3.x and IBM RS/6000
  1795. _____________________________________________________
  1796.  
  1797. 1.201: How do I do remote backup?
  1798.  
  1799. There seems to be several ways of doing this.  The first approach is a
  1800. one-liner to allow tar to reference another machine's device.  The
  1801. second is more complete but uses a similar approach.  The latest
  1802. edition to this section claims to be able to support mksysb on a
  1803. remote machine.  Thanks to all the contibutors.
  1804.  
  1805.   tar -b1 -cf - . | rsh REMOTEHOST "dd ibs=512 obs=1024 of=/dev/TAPEDEVICE"
  1806.  
  1807.  
  1808. From: kraemerf@franvm3.VNET.IBM.COM (Frank Kraemer)
  1809.  
  1810. [Ed.: I've verified this script works fine. However, it may be slow for
  1811.  large filesystems since it creates a temp file of filenames in /tmp.]
  1812.  
  1813. #!/bin/ksh
  1814. # @(#) Create a backup tape of the private user data.
  1815. #=================================================================#
  1816. #   Script :  usave.sh                                            #
  1817. #   Author :  F. Kraemer                                          #
  1818. #   Date   :  92/02/19                                            #
  1819. #   Update :  92/10/29                                            #
  1820. #   Info   :  the ultimative backup script                        #
  1821. #   Example:  usave.sh /dev/rmt0      -  save to local tape       #
  1822. #             usave.sh /save/save.me  -  save to local file       #
  1823. #             usave.sh /tmp/pipe      -  save to remote tape      #
  1824. #-----------------------------------------------------------------#
  1825. PS4="(+) "
  1826. #set -x
  1827. PROG=$(basename $0)
  1828. HOST=$(hostname)
  1829. TODAY=$(date +%H:%M:%S)
  1830. #
  1831. # cleanup
  1832. #
  1833. cleanup ()
  1834. {
  1835. ec=$1
  1836. error=$2
  1837. case "$ec"
  1838. in
  1839.    "$USAGE_EC")    # usage error
  1840.      error="Usage:\t$PROG DeviceName\n" 1>&2
  1841.     ;;
  1842.    "$NOTAP_EC")    # Tape error
  1843.      error="error:\t$PROG: $DEVICE is not available on the system.\n" 1>&2
  1844.     ;;
  1845.    "$LISTE_EC")    # list error
  1846.      error="error:\t$PROG: could not create tar list for $LOGNAME.\n" 1>&2
  1847.     ;;
  1848.    "$NOTAR_EC")    # tar command error
  1849.      error="error:\t$PROG: tar command failed.\n" 1>&2
  1850.     ;;
  1851.    "$PIPEP_EC")    # pipe error
  1852.      error="error:\t$PROG: mknod command failed.\n" 1>&2
  1853.     ;;
  1854.    "$NORSH_EC")    # rsh error
  1855.      error="error:\t$PROG: rsh - Remote Shell command failed.\n" 1>&2
  1856.     ;;
  1857.    "$RHOST_EC")    # remote host error
  1858.      error="error:\t$PROG: Remote Host unknown.\n" 1>&2
  1859.     ;;
  1860.    *)
  1861.    ;;
  1862. esac
  1863. case "$DEVICE"
  1864. in
  1865.     #
  1866.     # Fix the block size if $DEVICE is a tape device
  1867.     #
  1868.     /dev/rmt[0-9]*)
  1869.         echo "\n\t$PROG: Rewinding tape to begin.........(please wait)\n"
  1870.         tctl -f $DEVICE rewind 2>/dev/null
  1871.         ;;
  1872.     *) ;;
  1873. esac
  1874. rm -f ${LIST} ${PIPE} 2>/dev/null
  1875. [ -n "$error" ] && echo "\n${error}\n"
  1876. trap '' 0 1 2 15
  1877. exit "$ec"
  1878. }
  1879. #
  1880. # Variables
  1881. #
  1882. USAGE_EC=1                         # exit code for usage error
  1883. NOMNT_EC=2                         # exit code wrong device name
  1884. NOTAP_EC=3                         # exit code no tape available
  1885. LISTE_EC=4                         # exit code backup list error
  1886. NOTAR_EC=5                         # exit code for wrong tar
  1887. TRAPP_EC=6                         # exit code for trap
  1888. PIPEP_EC=7                         # exit code for pipe
  1889. RHOST_EC=8                         # exit code for bad ping
  1890. NORSH_EC=9                         # exit code for bad rsh
  1891. DEVICE="$1"                        # device to tar into
  1892. LIST="/tmp/.tar.$LOGNAME.$$"       #
  1893. REMOTEH=""                         # Remote host for backup
  1894. REMOTET=""                         # Remote tape for backup
  1895. tapedev=                           #
  1896. PIPE="/tmp/pipe"                   # Pipe for remote backup
  1897. #
  1898. # main()
  1899. #
  1900. tput clear
  1901. echo "\n\t$PROG started from $LOGNAME@$HOST on $TERM at $TODAY.\n"
  1902. rm -f $LIST 2>/dev/null
  1903. #
  1904. # Trap on exit/interrupt/break to clean up
  1905. #
  1906. trap "cleanup $TRAPP_EC \"Abnormal program termination. $PROG"\"  0 1 2 15
  1907. #
  1908. # Check command options
  1909. #
  1910. [ "$#" -ne 1 ]  &&  cleanup "$USAGE_EC" ""
  1911. #
  1912. # Check device name
  1913. #
  1914. [ `expr "$DEVICE" : "[/]"` -eq 0 ] && cleanup "$NOMNT_EC" \
  1915.         "$PROG: Backup device or file name must start with a '/'."
  1916. #
  1917. # Check tape device
  1918. #
  1919. case "$DEVICE"
  1920. in
  1921.     #
  1922.     # Fix the block size if $DEVICE is a tape device
  1923.     #
  1924.     /dev/rmt[0-9]*)
  1925.         #
  1926.         echo "\n\t$PROG: Verify backup media ($DEVICE)............\n"
  1927.         #
  1928.         # see if a low or high density tape device was specified
  1929.         # (eg rmt0.1)
  1930.         density="`expr $DEVICE : \
  1931.                 "/dev/rmt[0-9]*\.\([0-9]*\)"`"
  1932.         #
  1933.         # strip /dev/ from device name and
  1934.         # get the base name (eg translate:
  1935.         # /dev/rmt0.2 to rmt0)
  1936.         #
  1937.         tapedev="`expr $DEVICE : \
  1938.                 "/dev/\(rmt[0-9]*\)[\.]*[0-9]*"`"
  1939.         #
  1940.         # Check if the tape is defined in the system.
  1941.         lsdev -C -c tape -S Available -F "name" | grep $tapedev >/dev/null 2>&1
  1942.         rc=$?
  1943.         [ "$rc" -ne 0 ] && cleanup "$NOTAP_EC" ""
  1944.         #
  1945.         # Restore old tape name.
  1946.         #
  1947.         [ "${density:-1}" -lt 4 ] && density=1 || density=5
  1948.         DEVICE="/dev/${tapedev}.${density}"
  1949.         echo "\n\t$PROG: Insert a tape in ($DEVICE)........(press enter)\n"
  1950.         read TEMP
  1951.         echo "\n\t$PROG: Rewinding tape to begin...........(please wait)\n"
  1952.         tctl -f $DEVICE rewind 2>/dev/null
  1953.         ;;
  1954.     #
  1955.     # Backup is done on remote host. The remote shell facility
  1956.     # must be set up and running.
  1957.     #
  1958.     ${PIPE}*)
  1959.         #
  1960.         echo "\n\t$PROG: Assuming remote backup via network.\n"
  1961.         echo "\t$PROG: Enter name of Remote Host   ===> \c"
  1962.         read REMOTEH
  1963.         echo "\n\t$PROG: Pinging Remote Host to test connection.\n"
  1964.         ping ${REMOTEH} 1 1 >/dev/null 2>&1
  1965.         rc=$?                                    # give up unknown host
  1966.         [ "$rc" -ne 0 ] && cleanup "$RHOST_EC" ""
  1967.         JUNK=$(rsh ${REMOTEH} "/usr/sbin/lsdev -C -c tape -S Available")
  1968.         rc=$?                                    # give up rsh failed
  1969.         [ "$rc" -ne 0 ] && cleanup "$NORSH_EC" ""
  1970.         echo "\t$PROG: Available Tapes on ${REMOTEH} are :\n\n\t\t${JUNK}\n"
  1971.         echo "\t$PROG: Enter name of Remote Tape (e.g. /dev/rmt0) ===> \c"
  1972.         read REMOTET
  1973.         echo "\n\t$PROG: Insert tape on ${REMOTEH} in ${REMOTET}..(press enter)"
  1974.         read TEMP
  1975.         echo "\t$PROG: Rewinding Remote Tape ${REMOTET} on ${REMOTEH}.\n"
  1976.         rsh ${REMOTEH} "tctl -f ${REMOTET} rewind"
  1977.         rc=$?                                    # give up rsh failed
  1978.         [ "$rc" -ne 0 ] && cleanup "$NOTAP_EC" ""
  1979.         rm -f ${PIPE} 2>/dev/null
  1980.         mknod ${PIPE} p
  1981.         rc=$?                                    # give up mknod failed
  1982.         [ "$rc" -ne 0 ] && cleanup "$PIPEP_EC" ""
  1983.         cat ${DEVICE} | rsh ${REMOTEH} "dd of=${REMOTET} obs=100b 2>/dev/null" &
  1984.         ;;
  1985.     *)  ;;
  1986. esac
  1987. #
  1988. # Prepare the list
  1989. #
  1990. echo "\n\t$PROG: Create list of files to be saved...."
  1991. find $HOME -print > $LIST
  1992. rc=$?
  1993. [ "$rc" -ne 0 ] &&  cleanup "$LISTE_EC" ""
  1994. #
  1995. # tar the files
  1996. #
  1997. echo "\n\t$PROG: Changing current directory to (/)...."
  1998. cd / > /dev/null 2>&1
  1999. echo "\n\t$PROG: Running tar format backup from user ($LOGNAME)...."
  2000. tar -cvf "$DEVICE" -L "$LIST"
  2001. rc="$?"
  2002. [ "$rc" -ne 0 ]  && cleanup "$NOTAR_EC" ""
  2003. #
  2004. # Backup completed
  2005. #
  2006. TODAY=$(date +%H:%M:%S)
  2007. echo "\n\t$PROG ended at $TODAY............................\n\n"
  2008. cleanup 0
  2009.  
  2010. 1.201: How do I do remote backup?  (Continued)
  2011. From: Henk van Doorn <hvdoorn@xs4all.nl>
  2012.  
  2013. #!/bin/ksh
  2014. #######################################################################
  2015. #     rmksysb                                                         #
  2016. #######################################################################
  2017. #                                                                     #
  2018. # Description:                                                        #
  2019. #       creates a bootable mksysb backup of a remote system running   #
  2020. #    AIX 3.x or lists the Table of Contents of the current tape    #
  2021. #                                                                     #
  2022. # Usage:                                                              #
  2023. #       ./rmksysb $1 [$2]                           #
  2024. #        $1 - remote host to be backed up              #
  2025. #        $2 - optional: local tape device (default: rmt0)      #
  2026. #    or:                                  #    
  2027. #    ./rmksysb -l [$2]                                             #
  2028. #        to list Table of Contents saveset on tape in $2          #
  2029. #        (only useful on tapes created by rmksysb)          #
  2030. #                                                                     #
  2031. # Output:                                                             #
  2032. #       a bootable mksysb of the remote system                        #
  2033. #    or a listing of the TOC saveset on the current tape          #
  2034. #                                                                     #
  2035. # Remarks:                                  #
  2036. #    . rmksysb can only be used by root                  #    
  2037. #    . this script will use tapedevice .1, so if                 #
  2038. #      a >2.3GB drive is used: check density_set_1                  #
  2039. #    . the remote host needs /.rhosts to include the local host    #
  2040. #      for root access (+ shell enabled in /etc/inetd.conf)        #    
  2041. #    . you will need some room (>1.5MB) on /tmp on the remote host #
  2042. #      for standard mksysb .archive.list.* etc.              #
  2043. #    . remote standard output & standard error (except dd/chdev)   #
  2044. #      will go to local stdout & stderr                  #
  2045. #    . redirecting stdout can create quite large log-files (2MB)   #
  2046. #    . AIX versions should not be too far apart as the boot-saveset#
  2047. #      comes from the local system & the rest from the remote      #
  2048. #      (tested on AIX 3.2.5, AIX 4+ definitely won't work!!!)      #
  2049. #    . most likely this script will fail with multi-tape mksysb's: #
  2050. #      another incentive to keep rootvg as small as possible!      #
  2051. #                                      #
  2052. # Author:                                  #
  2053. #    Henk van Doorn                              #
  2054. #    Email: hvdoorn@xs4all.nl                             #
  2055. #                                      #
  2056. #    Thanks to all who contributed. Esp. Paul Wynn (AIXpert '93),  #
  2057. #    my colleagues Dominic Dinardo & Douwe van Terwisga          #
  2058. #    + the input from Usenet were stimulating; thanks folks!          #
  2059. #    I would welcome any additions & changes for the better...     # 
  2060. #                                                                     #
  2061. #######################################################################
  2062. #         CHANGES                                                     #
  2063. #######################################################################
  2064. #                                                                     #
  2065. # ID     WHO   DATE                        DESCR                      #
  2066. # --     ---   -------  --------------------------------------------- #
  2067. # X000     HvD   6Jan95   Created this file.                            #
  2068. # X001     HvD   2Feb95   Final version                                 #
  2069. #######################################################################
  2070.  
  2071. set +u
  2072.  
  2073. # Global variable definitions.
  2074. UMASK=`umask`
  2075. BLK_SZ=1024
  2076. BOOT_BLK_SZ=512
  2077. HOST=${1}
  2078.  
  2079. # TAPE = $2 with /dev/ & .* removed, defaulting to rmt0
  2080. TAPE=${2:-rmt0}
  2081. TAPE=${TAPE#/dev/}
  2082. TAPE=${TAPE%.*}
  2083.  
  2084. usage()
  2085. {
  2086.     echo "Usage: ./rmksysb <remote_host_name> [<tape_device>] or" >&2
  2087.     echo "       ./rmksysb -l [<tape_device>]" >&2
  2088.     echo "                 with <tape_device>= e.g. rmt1" >&2
  2089.     echo "Default <tape_device>=rmt0" >&2
  2090.     return
  2091. }
  2092.  
  2093. check_parms()
  2094. {
  2095. if [ "${HOST}" = "" ]
  2096. then
  2097.     usage
  2098.     exit 1
  2099. fi
  2100.  
  2101. if [ "${HOST}" = "-l" ]
  2102. then
  2103. # show TOC block which contains some backup details on rmksysb tapes
  2104.     get_tape_block_size
  2105.     chdev -l ${TAPE} -a block_size=${BOOT_BLK_SZ} >/dev/null 2>&1
  2106.     mt -f /dev/${TAPE} rewind
  2107.     mt -f /dev/${TAPE}.1 fsf 2
  2108.     dd if=/dev/${TAPE} count=1 2>/dev/null
  2109.     chdev -l ${TAPE} -a block_size=${OLD_BLK_SZ} >/dev/null 2>&1
  2110.     exit 
  2111. fi
  2112. }
  2113.  
  2114. check_host()
  2115. {
  2116. rsh ${HOST} hostname >/dev/null 2>&1
  2117. if [ $? -ne 0 ]
  2118. then
  2119.     echo "Check hostname & rsh access" >&2
  2120.     exit 1
  2121. fi
  2122. }
  2123.  
  2124. get_tape_block_size()
  2125. {
  2126. VALID=
  2127. `lsdev -Cc tape | cut -f1 -d" " | grep ${TAPE} 2>&1 >/dev/null` && 
  2128.     {
  2129.         OLD_BLK_SZ=`lsattr -El ${TAPE} -a block_size | cut -f2 -d" "`
  2130.         VALID=true
  2131.         }
  2132.  
  2133. if  [ "$VALID" = "" ]
  2134. then
  2135.     echo "Tape drive $TAPE is not a valid local drive!" >&2
  2136.     exit 1
  2137. fi
  2138. }
  2139.  
  2140. #
  2141. # The main procedure is analogous to its C counterpart,
  2142. # This is the basic driver routine.
  2143. #
  2144. main()
  2145. {
  2146.  
  2147. if [ "`id | grep 'uid=0'`" = "" ]
  2148. then 
  2149.     echo "rmksysb can only be run as root!" >&2
  2150.     exit 2 
  2151. fi
  2152. umask 022
  2153.  
  2154. check_parms
  2155. check_host
  2156. get_tape_block_size
  2157.  
  2158. # display some info on this rmksysb session
  2159. echo "`date`\n\nRemote System Backup from remote ${HOST} to local `hostname` on device:\n`lscfg -v -l ${TAPE} | sed -n '3,6p' | grep "[a-z]" `\n" 
  2160.  
  2161. # Here the action starts
  2162. rsh $HOST -n /usr/bin/mkszfile
  2163. rsh $HOST -n "echo ${BLK_SZ} > /tapeblksz"
  2164.  
  2165. rsh $HOST -n "rm -f /tmp/pipe.rmksysb"
  2166. rsh $HOST -n "rm -f /tmp/pipe.rmksysb.out"
  2167. rsh $HOST -n "rm -f /tmp/pipe.rmksysb.err"
  2168.  
  2169. rsh $HOST -n "/etc/mknod /tmp/pipe.rmksysb p"
  2170. rsh $HOST -n "/etc/mknod /tmp/pipe.rmksysb.out p"
  2171. rsh $HOST -n "/etc/mknod /tmp/pipe.rmksysb.err p"
  2172.  
  2173. # create remote startup file for mkinsttape
  2174. rsh $HOST -n "echo '#!/bin/ksh\nexport PATH=$PATH ; /usr/sbin/mkinsttape /tmp/pipe.rmksysb >/tmp/pipe.rmksysb.out 2>/tmp/pipe.rmksysb.err &' > /tmp/mkinsttape.start "
  2175. rsh $HOST -n "chmod 700 /tmp/mkinsttape.start"
  2176.  
  2177. chdev -l $TAPE -a block_size=${BOOT_BLK_SZ} >/dev/null 2>&1
  2178. tctl -f /dev/${TAPE} retension
  2179.  
  2180. echo
  2181. echo
  2182. echo ">>> SAVESET 1: BOS boot image from `hostname`"
  2183. echo
  2184. bosboot -d /dev/${TAPE}.1 -a 
  2185.  
  2186. echo
  2187. echo
  2188. echo ">>> SAVESET 2: BOS install utilities from ${HOST} (backup format)"
  2189. echo
  2190. rsh $HOST -n "nohup /tmp/mkinsttape.start" &
  2191.  
  2192. # get remote standard out & err to local stdout & err
  2193. rsh $HOST -n "dd if=/tmp/pipe.rmksysb.out 2>/dev/null" | dd 2>/dev/null &
  2194. rsh $HOST -n "dd if=/tmp/pipe.rmksysb.err 2>/dev/null" | ( dd 2>/dev/null ) >&2 &
  2195.  
  2196. # get remote mkinsttape to local tape device
  2197. rsh $HOST -n "dd if=/tmp/pipe.rmksysb 2>/dev/null" | dd 2>/dev/null | dd of=/dev/${TAPE}.1 conv=sync 2>/dev/null
  2198.  
  2199. echo
  2200. echo
  2201. echo ">>> SAVESET 3: Backup information (list with ./rmksysb -l [<tapedevice>])"
  2202. echo
  2203. # add dummy TOC to tape with some backup information
  2204. echo "`date`\n\nRemote System Backup from remote ${HOST} to local `hostname` on device:\n`lscfg -v -l ${TAPE} | sed -n '3,6p' | grep "[a-z]" `\n" | dd of=/dev/${TAPE}.1 conv=sync 2>/dev/null
  2205.  
  2206. # change blocksize to 1024 for better performance
  2207. chdev -l ${TAPE} -a block_size=${BLK_SZ} >/dev/null 2>&1
  2208.  
  2209. # rewind & skip first 3 savesets
  2210. mt -f /dev/${TAPE} rewind
  2211. mt -f /dev/${TAPE}.1 fsf 3
  2212.  
  2213. echo
  2214. echo
  2215. echo ">>> SAVESET 4: mksysb (rootvg backup) from ${HOST} (tar format)"
  2216. echo
  2217. # start the actual remote mksysb
  2218. echo "The contents of the /.fs.size file on ${HOST} are:"
  2219. rsh $HOST -n "cat /.fs.size"
  2220. echo
  2221.  
  2222. rsh $HOST -n "nohup /usr/bin/mksysb /tmp/pipe.rmksysb >/tmp/pipe.rmksysb.out 2>/tmp/pipe.rmksysb.err &" &
  2223.  
  2224. # get remote standard out & err to local stdout
  2225. rsh $HOST -n "dd if=/tmp/pipe.rmksysb.out 2>/dev/null" | dd 2>/dev/null &
  2226. rsh $HOST -n "dd if=/tmp/pipe.rmksysb.err 2>/dev/null" | ( dd 2>/dev/null ) >&2 &
  2227.  
  2228. # get remote mksysb to local tape device
  2229. rsh $HOST -n "dd if=/tmp/pipe.rmksysb 2>/dev/null" | dd obs=${BLK_SZ} 2>/dev/null | dd of=/dev/${TAPE} bs=${BLK_SZ} conv=sync 2>/dev/null
  2230.  
  2231. # cleaning up
  2232. rsh $HOST -n "rm -f /tmp/pipe.rmksysb"
  2233. rsh $HOST -n "rm -f /tmp/pipe.rmksysb.out"
  2234. rsh $HOST -n "rm -f /tmp/pipe.rmksysb.err"
  2235. rsh $HOST -n "rm -f /tmp/mkinsttape.start"
  2236.  
  2237. chdev -l ${TAPE} -a block_size=${OLD_BLK_SZ} >/dev/null 2>&1
  2238. umask $UMASK
  2239.  
  2240. # display some closing info on this rmksysb session
  2241. echo "Remote System Backup from remote ${HOST} to local `hostname` is finished.\n`date`\n" 
  2242.  
  2243. } #end of main
  2244.  
  2245. # Call the driver
  2246. main 
  2247.  
  2248.  
  2249.  
  2250. 1.202: How do I backup a multi-disk volume group?
  2251. From: pack@acd.ucar.edu (Daniel Packman)
  2252.  
  2253. [ Ed.: I have not verified this procedure. I would actually recommend
  2254.   NOT to have one volume group span multiple disks unless you really
  2255.   need such big logical volumes. ]
  2256.  
  2257.   1. If you have a set of three or more disks in a volume group
  2258.      (typically 3 for 5xx machines with three internal drives;
  2259.      with only two, the procedures outlined here have to be modified
  2260.      to ignore the fact that you don't have a quorum in the volume group)
  2261.  
  2262.   2. If one drive has failed (usually only one fails at a time :-) )
  2263.  
  2264. It is possible to go through a service boot (the volume group is called
  2265. rootvg and one of the 2 good disks on it is called hdisk0):
  2266.  
  2267.   importvg -y rootvg hdisk0
  2268.   varyonvg -f -n -m1 rootvg
  2269.  
  2270. These commands will work, but give error messages. If you wish to mount
  2271. a user filesystem, say /u on logical volume /dev/lv00, then
  2272.  
  2273.   mount -f /dev/lv00 /v
  2274.  
  2275. will work only if jfslog, the journaled file system log device, is not
  2276. on the damaged disk. If it is, you must (and can in any case) mount the
  2277. filesystem read-only:
  2278.  
  2279.   mount -f -r /dev/lv00 /v
  2280.  
  2281. This crucial and rather obvious point baffled several level 3 support
  2282. personnel at Austin as well as myself for almost a week. Once the file
  2283. system(s) of interest are available, they can be saved to tape for
  2284. restoration later. Of course, one can expect only about two thirds of a
  2285. filesystem to be recoverable if it spans all 3 physical disks. One
  2286. other point to remember is that the standard boot procedure from floppy
  2287. includes the restore command but does not include the backup command.
  2288.  
  2289. *****************************************************************************
  2290. * If you do not have other RS6000 machines at your site it is imperative    * 
  2291. * that you either build a bootable tape which includes either restore or    * 
  2292. * tar or cpio (a bootable floppy set will not have enough space) or at the  *
  2293. * very least copy onto a spare floppy backup, cpio, or tar.  The floppy     *
  2294. * should be created with backup -ivq so that its contents can be read into  *
  2295. * the memory resident system after booting.                                 *
  2296. *****************************************************************************
  2297.  
  2298. All is not lost if tar, cpio or backup are available on an undamaged
  2299. disk that can be mounted. Since tar and cpio are in /bin, they may both
  2300. very well be unavailable.
  2301.  
  2302. It is a very good idea for those who have tape devices to build a
  2303. bootable tape with their desired extra commands in it. Follow the
  2304. instructions from IBM but add your desired commands to the following
  2305. three files:
  2306.  
  2307.     /usr/lpp/bosinst/tape2
  2308.     /usr/lpp/bosinst/diskette/boot2
  2309.     /usr/lpp/bosinst/diskette/inslist
  2310.  
  2311. If you have anything other than a minimum memory configuration, you
  2312. should be able to add many commands.
  2313.  
  2314.  
  2315. 1.203: How do I put multiple backups on a single 8mm tape?
  2316. From: kerm@mcnc.org (Cary E. Burnette)
  2317.  
  2318. There are two possible solutions to this, both of which use /dev/rmt0.1
  2319. which is non-rewinding.
  2320.  
  2321. SOLUTION #1
  2322. -----------
  2323.  
  2324. To put multiple backups on a single tape, use /dev/rmt0.1, which is a
  2325. no-rewind device, using either rdump or backup (both by name & inode
  2326. work). Using rdump or backup "byinode" both generate the message that
  2327. the tape is rewinding but actually do not. This is an example that
  2328. works on my system:
  2329.  
  2330. # rsh remote1 -l root /etc/rdump host:/dev/rmt0.1 -Level -u /u
  2331. # rsh remote2 -l root /etc/rdump host:/dev/rmt0.1 -Level -u /u
  2332. # tctl -f /dev/rmt0.1 rewind       # rewinds the tape
  2333.  
  2334. where I am implementing the command from host.
  2335. To restore a table of contents of the first I would use 
  2336.  
  2337. # restore -f /dev/rmt0.1 -s1 -tv
  2338.  
  2339. where the -s1 flag tells restore to go to the first record on the tape. 
  2340. Type the exact command again to get the second record. The -s(Number)
  2341. means go to Number record from this spot. It works pretty well.
  2342.  
  2343.  
  2344. SOLUTION #2
  2345. -----------
  2346.  
  2347. Steve Knodle
  2348. Educational Resources Center
  2349. Clarkson University
  2350.  
  2351. I use:
  2352. ------------------- Dump.sh --------------------
  2353. CONTENTSFILE=`date |dd conv=lcase |sed -e 's/19//' |awk '{print $6 $2 $3}'`
  2354. set -x
  2355. LEVEL=$1
  2356. shift
  2357.  
  2358. backup -c -b 56 -$LEVEL -uf /dev/rmt0.1 /
  2359. backup -c -b 56 -$LEVEL -uf /dev/rmt0.1 /usr
  2360. backup -c -b 56 -$LEVEL -uf /dev/rmt0.1 /u
  2361. tctl -f /dev/rmt0 rewind
  2362.  
  2363. touch /usr/local/dumps/Contents.$CONTENTSFILE
  2364. echo "Dumping /" >>/usr/local/dumps/Contents.$CONTENTSFILE
  2365. restore -t -s 1 -f /dev/rmt0.1 >>/usr/local/dumps/Contents.$CONTENTSFILE
  2366. echo "Dumping /usr" >>/usr/local/dumps/Contents.$CONTENTSFILE
  2367. restore -t -q -s 1 -f /dev/rmt0.1 >>/usr/local/dumps/Contents.$CONTENTSFILE
  2368. echo "Dumping /u" >>/usr/local/dumps/Contents.$CONTENTSFILE
  2369. restore -t -q -s 1 -f /dev/rmt0.1 >>/usr/local/dumps/Contents.$CONTENTSFILE
  2370. tctl -f /dev/rmt0 rewind
  2371.  
  2372. I process the table-of-contents first by a little program that does
  2373. common prefix encoding, and then compress.
  2374.  
  2375. This gives a table of contents file I can keep on-line until the tape
  2376. is reused.
  2377.  
  2378.  
  2379. 1.204: How can I make an exact duplicate of a tape over the network?
  2380.  
  2381. The challenge here is not to have to create a temporary file (disk space
  2382. limitation) and work across heterogeneous networks.
  2383.  
  2384. This script might work:
  2385.  
  2386. LOCAL=/dev/tape_dev
  2387. REMOTE=/dev/tape_dev
  2388. dd if=$LOCAL ibs=64k obs=512 | rsh remote_host dd ibs=512 obs=64k of=$REMOTE
  2389.  
  2390.  
  2391. From: pack@acd.ucar.edu (Daniel Packman)
  2392.  
  2393. Daniel provides the following perl script to convert from the known
  2394. world's function codes to AIX for compatibility.
  2395.  
  2396. #!/bin/perl
  2397. # Wrapper to convert input rmt requests to
  2398. # AIX 3.2 ioctl numbers.  We pass on all commands we don't understand
  2399. # I0 MTWEOF -> I10  STWEOF write and end-of-file record
  2400. # I1 MTFSF  -> I11  STFSF  forward space file
  2401. # I2 MTBSF  -> I12  STRSF  reverse space file
  2402. # I3 MTFSR  -> I13  STFSR  forward space record
  2403. # I4 MTBSR  -> I14  STRSR  reverse space record
  2404. # I5 MTREW  -> I6   STREW  rewind
  2405. # I6 MTOFFL -> I5   STOFFL rewind and unload tape
  2406. # I7 MTNOP  -> I0   (no-op? should ignore following count)
  2407. # I8 MTRETEN-> I8   STRETEN retension tape, leave at load point
  2408. # I9 MTERASE-> I7   STERASE erase tape, leave at load point
  2409. #I10 MTEOM (position to end of media ... no ibm equivalent?)
  2410. #I11 MTNBSF  (backward space file to BOF ... no ibm equivalent?)
  2411. @iocs = (10,11,12,13,14,6,5,0,8,7);
  2412. open(RMT,"|/usr/sbin/rmt") || die "Can't open pipe to rmt\n";
  2413. select(RMT);
  2414. $| = 1;
  2415. while (<STDIN>) {
  2416.   s/(^I)(\d$)/I$iocs[$2]/;
  2417.   exit 0 if $_ =~ /^[Qq]/;
  2418.   print RMT $_ ; }
  2419. exit 0;
  2420.  
  2421.  
  2422. 1.205: What is tape block size of 0?
  2423. From: benson@odi.com (Benson I. Margulies)
  2424.  
  2425. Tape devices are generally split into two categories: fixed block and
  2426. variable block.  1/4" tape is the fixed block, and 8mm is variable.
  2427.  
  2428. On a fixed block size device, the kernel always sends data to the device
  2429. in suitable block size lumps, and varying the size passed to write(2)
  2430. (e.g., via the bs option to dd) gives the kernel more data to stream. 
  2431. On a variable block size device, the kernel writes to the device
  2432. whatever passed to it. On an 8mm, it had better be a multiple of 1024
  2433. to get efficient tape usage.
  2434.  
  2435. AIX has the World's Only Variable Block Size 1/4" tape drive. If you
  2436. use SMIT to set the block size to a nonzero value, AIX treats the device
  2437. as fixed block size, whether it is or not. By default, 8mm drives are
  2438. set to the same size as 1/4", 512 bytes. This is wasteful, but
  2439. otherwise mksysb and installp would fail.
  2440.  
  2441. If you set the block size to 0, the device is treated as variable block
  2442. size, and the size passed to write becomes the physical block size. 
  2443. Then if you use a sensible block size to dd, all should be wonderful.
  2444.  
  2445.  
  2446. 1.206: Resetting a hung tape drive
  2447. From: Craig_Anderson@kcbbs.gen.nz (Craig Anderson)
  2448.  
  2449. A process accesses the tape drive. The process stops, exits, or whatever,
  2450. but still hold on to the drive. When this happens, the process cannot be
  2451. killed by any signal and the tape drive cannot be used by any other
  2452. process until the machine is rebooted.
  2453.  
  2454. The following should help:
  2455.  
  2456. RESET:
  2457.  
  2458. AIX, like most UNIX systems has no reset function for tape drives. You
  2459. can however send a Bus Device Reset (a standard SCSI message) to the
  2460. tape drive using the following piece of code. If the tape drive does
  2461. not respond to the BDR, then a SCSI Bus Reset will be sent (and this
  2462. will reset every device on the SCSI Bus). SCSI Bus resets are rather
  2463. extreme so you should refrain from using this program unnecessarily. 
  2464. But there are times (like after you've inserted a jammed/old/bad tape in
  2465. an 8mm drive), when there's no other way to reset the device other than
  2466. to shutdown and reboot (obviously you can power down and up an external
  2467. drive to reset it - and this would be the better choice).
  2468.  
  2469. This is actually documented in info, but can be hard to find and
  2470. there's no complete program.
  2471.  
  2472. /* taperst: resets the tape drive by sending a BDR to the drive. */
  2473. #include <stdio.h>
  2474. #include <fcntl.h>
  2475. #include <errno.h>
  2476. #include <sys/scsi.h>
  2477.  
  2478. int main(int argc, char **argv)
  2479. {
  2480.          /* This can be run only by root */
  2481.  
  2482.          if (argc != 2) {
  2483.              fprintf(stderr, "Usage: %s /dev/rmt#\n", argv[0]);
  2484.              return 1;
  2485.          }
  2486.  
  2487.          if (openx(argv[1], O_RDONLY, 0, SC_FORCED_OPEN) < 0) {
  2488.              perror(argv[0]);
  2489.              return 2;
  2490.          }
  2491.          return 0;
  2492. }
  2493.  
  2494. 1.207: How do I read a mksysb tape with tar?
  2495. From: Marc Pawliger (marc@sti.com)
  2496.  
  2497. To recover specific files from a backup made with mksysb, try
  2498. $ tctl fsf 3
  2499. $ tar xvf/dev/rmt0.1 ./your/file/name
  2500.  
  2501.  
  2502. 1.208: How do I read a 5Gbyte tape on a 2Gbyte drive?
  2503. Posted by: bobmet@clam.com (Robert Metcalf)
  2504.  
  2505. To read a 5Gbyte tape on a 2Gbyte drive, the
  2506. tape needs to have been created with a density setting of 20.
  2507.  
  2508. The following is from IBM's electronic ASKSUPPORT repository:
  2509.   
  2510.    R: The 7208 011 5 GB tape drive has various density settings which are
  2511.       as follows:
  2512.   
  2513.      +-------+--------------------------+
  2514.      | DENSIT| DESCRIPTION              |
  2515.      | SETTIN|                          |
  2516.      +-------+--------------------------+
  2517.      | 140   | Writes in 5.0GB mode and |
  2518.      |       | will enable data com-    |
  2519.      |       | pression; also, to do    |
  2520.      |       | compression you must use |
  2521.      |       | "DATA COMPRESSION = yes" |
  2522.      +-------+--------------------------+
  2523.      | 21    | Writes in 5.0GB mode and |
  2524.      |       | will NOT do data com-    |
  2525.      |       | pression                 |
  2526.      +-------+--------------------------+
  2527.      | 20    | Writes in 2.3GB mode and |
  2528.      |       | will NOT do data com-    |
  2529.      |       | pression                 |
  2530.      +-------+--------------------------+
  2531.      | 00    | Factory power-on default |
  2532.      |       | for 5.0GB data com-      |
  2533.      |       | pression mode            |
  2534.      +-------+--------------------------+
  2535.   
  2536.      The density setting of the 7208 011 must be 20 for it to make a tape
  2537.      that is readable by the 7208 001.
  2538.  
  2539. ______________________________________________________________________________
  2540. 1.300: Some info about the memory management system
  2541. From: Michael Coggins (MCOG@CHVM1.VNET.IBM.COM).
  2542.  
  2543. 1. Does AIX use more paging space than other unix systems?
  2544.  
  2545. Under many scenarios, AIX requires more paging space than other unix
  2546. systems. The AIX VMM implements a technique called "early allocation of
  2547. paging space". When a page is allocated in RAM, and it is not a
  2548. "client" (NFS) or a "persistent" (disk file) storage page, then it is
  2549. considered a "working" storage page. Working storage pages are commonly
  2550. an application's stack, data, and any shared memory segments. So, when
  2551. a program's stack or data area is increased, and RAM is accessed, the
  2552. VMM will allocate space in RAM and space on the paging device. This
  2553. means that even before RAM is exhausted, paging space is used. This
  2554. does not happen on many other unix systems, although they do keep track
  2555. of total VM used.
  2556.  
  2557. Example 1: 
  2558. Workstation with 64mb RAM is running only one small application that
  2559. accesses a few small files. Everything fits into RAM, including all
  2560. accessed data. On AIX, some paging space will already be used. On
  2561. other unix systems, paging space will be 100% free. Clearly, this is an
  2562. example that shows where we use more paging space than the other machines.
  2563.  
  2564. Example 2:
  2565.  
  2566. Same machine as above, except we are in an environment where many
  2567. applications are running with inadequate RAM. Also, the system is
  2568. running applications that are started, run, left idle, and not in
  2569. constant use. A session of FRAME running in a window, for example. 
  2570. What happens is that eventually (theoretically) all applications will be
  2571. paged out at least once. On the AIX system and the other systems the
  2572. total paging requirements will be the same (assuming similar malloc
  2573. algorithm). The major difference is that the AIX system allocated the
  2574. paging space pages before they were actually needed, and the other
  2575. systems did not allocate them until they were needed. However, most
  2576. other systems have an internal variable that gets incremented as virtual
  2577. memory pages are used. AIX does not do this. This can cause the AIX
  2578. system to run out of paging space (virtual memory), even though malloc()
  2579. continues to return memory. This "feature" allows sparse memory
  2580. segments to work, but requires that all normal users of malloc()
  2581. (sbrk()) know how much virtual memory will be available (actually
  2582. impossible), and to handle a paging space low condition. A big problem. 
  2583. There are some pretty obvious pros and cons to both methods of doing
  2584. Virtual Memory.
  2585.  
  2586. 2. How much paging space do I need?
  2587.  
  2588. Concerning the rule of thumb of having 2 times RAM for paging space:
  2589. this is rather simplistic, as are most rules of thumb.  If the machine
  2590. is in a "persistent storage environment", meaning that they have a few
  2591. small programs, and lots of data, they may not need even as much as 1
  2592. times RAM for paging space.  For example, a 1GB database server running
  2593. on a 6000 with 256MB of RAM, and only running about 50MB of "working"
  2594. storage does not need 512MB of paging space, or even 256MB.  They only
  2595. need the amount of paging space that will allow all their working
  2596. storage to be paged out to disk.  This is because the 1GB database is
  2597. mostly "persistent storage", and will require little or no paging space. 
  2598. Excessive paging space may simply mean wasted disk space.  However,
  2599. avoid insufficient paging space.  Tip: Don't have more than one paging
  2600. space per disk.  Tip: Put lots of RAM in your system - it will use it.
  2601.  
  2602. 3. Why does vmstat show no free RAM pages?
  2603.  
  2604. AIX uses RAM as a possibly huge disk buffer.  If you read a file in the
  2605. morning, that file is read into RAM, and left there.  If no other
  2606. programs need that RAM, that file will be left in RAM until the machine
  2607. is halted.  This means that if you need the file again, access will be
  2608. quick.  If you need that RAM, the system will simply use the pages the
  2609. file were using. The pages were flushed back to disk earlier.  This
  2610. means that you can get a huge speedup in disk access if you have enough
  2611. RAM.  For example, a 200MB database will just ease into RAM if you have
  2612. a 256MB system.
  2613.  
  2614. 4. Since vmstat shows no free RAM pages, am I out of RAM?
  2615.  
  2616. Probably not. Since disk files will be "mapped" into RAM, if vmstat
  2617. shows lots of RAM pages FREE, then you probably have too much RAM (not
  2618. usual on a RISC System/6000)!
  2619.  
  2620. 5. Shouldn't the "avm" and the "fre" fields from vmstat add up to something?
  2621.  
  2622. No. The "avm" field tells you how much "Active Virtual Memory" AIX
  2623. thinks you are using. This will closely match the amount of paging
  2624. space you are using. This number has *ABSOLUTELY* nothing to do with
  2625. the amount of RAM you are using, and does *NOT* include your mapped
  2626. files (disk files).  The amount of RAM can be determined with
  2627. /usr/sbin/bootinfo -r
  2628.  
  2629. 6. Why does the "fre" field from vmstat sometimes show lots of free
  2630.    RAM pages?
  2631.  
  2632. This will happen after an application that used a lot of RAM via
  2633. "working" storage (not NFS storage, and not disk file or "persistent"
  2634. storage) exits. When RAM pages that were used by working storage (a
  2635. program's stack and data area) are no longer needed, there is no need to
  2636. leave them around. AIX completely frees these RAM pages. The time to
  2637. access these pages versus a RAM page holding a "sync'd" mapped file is
  2638. almost identical. Therefore, there is no need to periodically "flush" RAM.
  2639.  
  2640. 7. Is the vmstat "fre" field useful?
  2641.  
  2642. The vmstat "fre" field represents the number of free page frames.  If
  2643. the number is consistently small (less than 500 pages), this is normal. 
  2644. If the number is consistently large (greater than 4000 pages), then you
  2645. have more memory than you need in this machine.
  2646.  
  2647.  
  2648. 1.301: How much should I trust the ps memory reports?
  2649. From: chukran@austin.VNET.IBM.COM
  2650.  
  2651. Using "ps vg" gives a per process tally of memory usage for each running
  2652. process.  Several fields give memory usage in different units, but these
  2653. numbers do not tell the whole story on where all the memory goes.
  2654.  
  2655. First of all, the man page for ps does not give an accurate description
  2656. of the memory related fields.  Here is a better description:
  2657.  
  2658. RSS - This tells how much RAM resident memory is currently being used
  2659. for the text and data segments for a particular process in units of
  2660. kilobytes.  (this value will always be a multiple of 4 since memory is
  2661. allocated in 4 KB pages).
  2662.  
  2663. %MEM - This is the fraction of RSS divided by the total size of RAM for
  2664. a particular process.  Since RSS is some subset of the total resident
  2665. memory usage for a process, the %MEM value will also be lower than actual.
  2666.  
  2667. TRS - This tells how much RAM resident memory is currently being used
  2668. for the text segment for a particular process in units of kilobytes. 
  2669. This will always be less than or equal to RSS.
  2670.  
  2671. SIZE - This tells how much paging space is allocated for this process
  2672. for the text and data segments in units of kilobytes.  If the executable
  2673. file is on a local filesystem, the page space usage for text is zero. 
  2674. If the executable is on an NFS filesystem, the page space usage will be
  2675. nonzero.  This number may be greater than RSS, or it may not, depending
  2676. on how much of the process is paged in.  The reason RSS can be larger is
  2677. that RSS counts text whereas SIZE does not.
  2678.  
  2679. TSIZ - This field is absolutely bogus because it is not a multiple of 4
  2680. and does not correlate to any of the other fields.
  2681.  
  2682. These fields only report on a process text and data segments.  Segment
  2683. size which cannot be interrogated at this time are:
  2684.  
  2685.        Text portion of shared libraries (segment 13)
  2686.  
  2687.        Files that are in use. Open files are cached in memory as
  2688.        individual segments.  The traditional kernel cache buffer
  2689.        scheme is not used in AIX 3.
  2690.  
  2691.        Shared data segments created with shmat.
  2692.  
  2693.        Kernel segments such as kernel segment 0, kernel extension
  2694.        segments, and virtual memory management segments.
  2695.  
  2696. Speaking of kernel segments, the %MEM and RSS report for process zero
  2697. are totally bogus for AIX 3.1.  The reason why RSS is so big is that the
  2698. kernel segment zero is counted twice.  For AIX 3.2, this has been
  2699. changed, but the whole story is still not known.  The RSS value for
  2700. process 0 will report a very small number of the swapper private data
  2701. segment.  It does not report the size of the kernel segment 0, where the
  2702. swapper code lives.
  2703.  
  2704. In summary, ps is not a very good tool to measure system memory usage. 
  2705. It can give you some idea where some of the memory goes, but it leaves
  2706. too many questions unanswered about the total usage.
  2707.  
  2708.  
  2709. 1.302: Which simms do RS6000's use?
  2710.  
  2711. This answer is under construction... I'm trying to collect details
  2712. about compatable simms.
  2713.  
  2714. RS/6000 220,230 USE 2 pair 70ns PS/2 style simms
  2715. RS/6000 250,C10 USE 4 pair 70ns PS/2 style simms
  2716.  
  2717.  
  2718. 1.303+ What is kproc?
  2719.  
  2720. kproc (always PID 514?) is the kernel's idle process.
  2721.  
  2722.  
  2723. ______________________________________________________________________________
  2724. 1.400: How do I make an informative prompt in the shell?
  2725.  
  2726. In the Korn Shell (ksh), the PS1 variable is expanded each time it is
  2727. printed, so you can use:
  2728.  
  2729. $ export myhost=`hostname`
  2730. $ PS1='$LOGNAME@$myhost $PWD \$ '
  2731.  
  2732. to get, e.g. 
  2733.  
  2734. bengsig@ieibm1 /u/bengsig $
  2735.  
  2736. In the C-shell, use:
  2737.  
  2738. % set myhost=`hostname`
  2739. % alias cd 'chdir \!* > /dev/null; set prompt="$LOGNAME@$myhost $cwd % "'
  2740. % cd
  2741.  
  2742. to get, e.g.
  2743.  
  2744. bengsig@dkunix9 /u/bengsig/aixfaq %
  2745.  
  2746. There is no easy solution in the Bourne Shell.  Use the Korn Shell instead.
  2747.  
  2748.  
  2749. 1.401: How do I set up ksh for emacs mode command line editing?
  2750.  
  2751. The ksh has an undocumented way of binding the arrowkeys to the emacs
  2752. line editing commands. In your .kshrc, add:
  2753.  
  2754. alias __A=`echo "\020"`   # up arrow = ^p = back a command
  2755. alias __B=`echo "\016"`   # down arrow = ^n = down a command
  2756. alias __C=`echo "\006"`   # right arrow = ^f = forward a character
  2757. alias __D=`echo "\002"`   # left arrow = ^b = back a character
  2758. alias __H=`echo "\001"`   # home = ^a = start of line
  2759.  
  2760. Type "set -o emacs" or put this line in your .profile.
  2761.  
  2762. Also, you MUST have PTF U406855 for this to work in AIX 3.2.  The APAR #
  2763. for the problem is IX25982, which may have been superseded.
  2764.  
  2765.  
  2766. 1.402: Listing files with ls causes a core dump
  2767. From: John F Haugh II
  2768.  
  2769. Scenario: a directory that is shared by N users (N >= 200).
  2770. Run 'ls -l' in that directory.  It goes for a while, then
  2771. Seg fault(coredump)!
  2772.  
  2773. It only occurs when the usernames are displayed (almost every file is
  2774. owned by a different person).  The -g and -n options work fine; only -l
  2775. and -o (which shows owner and not group) cause it. 
  2776.  
  2777. I believe that this problem was corrected by U407548.  If you have that
  2778. many users that you are having core dump problems (it took over 200),
  2779. you might also want to look into getting the PTF that fixes IX31403. 
  2780. That APAR deals with large numbers of accounts and performance problems
  2781. associated with looking them up.
  2782.  
  2783.  
  2784. 1.403: How do I put my own text into InfoExplorer?
  2785.  
  2786. With AIX 3.1, you cannot do it.  AIX 3.2 has a product called
  2787. InfoCrafter that allows you to do that.
  2788.  
  2789.  
  2790. 1.404: InfoExplorer ASCII key bindings 
  2791. From: mycroft@hal.gnu.ai.mit.edu (Charles Hannum)
  2792.  
  2793. If you just press 'Return' when it starts up, with 'Basic Screen
  2794. Operations' highlighted, you'll get some help.
  2795.  
  2796. If you look long enough, you'll find a page named 'Using Keys and Key
  2797. Sequences in the InfoExplorer ASCII Interface'.  It describes the key
  2798. sequences and actions.  Here are a few to get you started.
  2799.  
  2800. Keys       Action
  2801.  
  2802. Ctrl-W     Moves between the Navigation screen and the Reading screen.
  2803. If the Navigation screen is displayed, you can press Ctrl-W to display
  2804. the Reading screen.  If the Reading screen is displayed, you can press
  2805. Ctrl-W to display the Navigation screen.
  2806.  
  2807. Ctrl-O     Makes the menu bar active or inactive.  If your text cursor is
  2808. located in the text area of the screen, you can press Ctrl-O to make the
  2809. menu bar active.  If the menu bar is already active, you can press
  2810. Ctrl-O to make it inactive, which moves the text cursor to the text area.
  2811.  
  2812. Tab     Moves to the next menu bar option in the menu bar.  If a pull-down
  2813. menu is not displayed and you press the Right Arrow key, the next menu
  2814. bar option is displayed in reverse video.
  2815.  
  2816.  
  2817. 1.405: How can I add new man pages to the system?
  2818. From: horst@faui63.informatik.uni-erlangen.de (Horst Luehrsen)
  2819.  
  2820. Put the man pages in /usr/man, e.g. /usr/man/man1/tcsh.1 for the tcsh
  2821. man page.  Unter AIX 3.1.10, /usr/lib/makewhatis can be used to update
  2822. the makewhatis-database /usr/man/whatis so apropos and whatis know about
  2823. the added manpages.  /usr/lib/makewhatis should be available on all 3.2
  2824. versions.
  2825.  
  2826.  
  2827. 1.406: Why can't I read man pages?  Where is nroff?
  2828.  
  2829. Nroff and troff aren't in the base installation.  It is shipped as
  2830. part of AIX 3.2.5 but may not be installed.  Use smit to install a
  2831. software package called txtfmt.tfs.obj from your 3.2.5 distribution
  2832. media.
  2833.  
  2834.  
  2835. 1.407: Why is my enviornment only loaded once?
  2836.  
  2837. The .profile file is only loaded once (for you login shell) subsequent
  2838. shells should be initialized by setting ENV=$HOME/.kshrc (for ksh).
  2839.  
  2840. Bash users can use $HOME/.bash_profile for the login shell environment
  2841. and $HOME/.bashrc.
  2842.  
  2843.  
  2844. 1.408: Where is the 'nawk' command on my AIX system?
  2845. (From: Jeff Wang      hjiwa@nor.chevron.com)
  2846.  
  2847. The /bin/nawk that exists on many UNIX flavors is a superset of the
  2848. 'awk' command, revised by the same original authors to include added
  2849. functionality.  All the extra options normally associated with 'nawk'
  2850. on other UNIXes have been incorporated into the AIX version of 'awk';
  2851. the AIX 'awk' InfoExplorer or man pages include nawk-specific features
  2852. such as the "-v" command line option and atan2(), rand(), srand(),
  2853. match(), sub(), gsub(), system(), close(), getline functions.
  2854.  
  2855. If your AIX version is missing /bin/nawk (as are most AIX 3.x
  2856. versions), the simplest way to get around this and maintain script
  2857. portability between UNIX platforms is to make a /bin/nawk link to
  2858. /bin/awk (as root, of course).  If you do not have root privilege or
  2859. do not want to create a /bin/nawk link, to make the script work on
  2860. different UNIXes, you may have to test `uname` first and set all
  2861. 'nawk' references on AIX runs to /bin/awk.  If your script is to only
  2862. run on AIX systems, you can just change all references of 'nawk' to
  2863. 'awk' and everything should still work okay...but check the AIX awk
  2864. script on test data prior to making actual runs.
  2865.  
  2866. ______________________________________________________________________________
  2867. 1.500  Which release of X11 do I have?
  2868.  
  2869. Run 'lslpp -h X11rte.obj'.
  2870. If your output has a line similar to:
  2871.  
  2872.             01.02.0000.0000 COMPLETE   COMMIT     03/04/93   02:05:11 root
  2873.  
  2874. you have X11 R4. If your output has a line similar to:
  2875.  
  2876.     U491068 01.02.0003.0000 COMPLETE   COMMIT     07/28/93   12:50:42 root
  2877.  
  2878. you have X11 R5. Some people also call these AIXwindows 1.2.0 and 1.2.3.
  2879.  
  2880.  
  2881. 1.501: How to prevent ctrl-alt-backspace from killing the X session
  2882.  
  2883. Start X with 'xinit -T' to disable ctrl-alt-backspace from stopping X.
  2884.  
  2885.  
  2886. 1.502: Who has a termcap/terminfo source for the HFT console?
  2887.  
  2888. The console used on the RISC System/6000, PS/2 and RT can be used as a
  2889. terminal on another system with the termcap below.  You can find this
  2890. and other termcaps in /lib/libtermcap/termcap.src, including IBM
  2891. specific ones.  The terminfo sources are stored in /usr/lib/terminfo/*.ti.
  2892. This termcap can also be used from an aixterm window.
  2893.  
  2894. hf|hft|hft-c|ibm8512|ibm8513|IBM_High_Function_Terminal:\
  2895.     :co#80:li#25:am:ht:\
  2896.     :cm=\E[%i%d;%dH:ti=\E[25;1H:te=\E[20h:\
  2897.     :nd=\E[C:up=\E[A:do=^J:ho=\E[H:\
  2898.     :bs:sf=\E[S:ec=\E[%dX:\
  2899.     :cl=\E[H\E[J:cd=\E[J:ce=\E[K:\
  2900.     :AL=\E[%dL:DL=\E[%dM:al=\E[L:dl=\E[M:\
  2901.     :im=\E[4h:ei=\E[4l:mi:\
  2902.     :dm=\E[4h:ed=\E[4l:\
  2903.     :so=\E[7m:se=\E[m:ul=\E[4m:ue=\E[m:\
  2904.     :md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[m:\
  2905.     :as=^N:ae=^O:sc=\E[s:rc=\E[u:\
  2906.     :kl=\E[D:kb=^H:kr=\E[C:ku=\E[A:kd=\E[B:kh=\E[H:\
  2907.     :kn#10:k1=\E[001q:k2=\E[002q:k3=\E[003q:k4=\E[004q:k5=\E[005q:\
  2908.     :k6=\E[006q:k7=\E[007q:k8=\E[008q:k9=\E[009q:k0=\E[010q:\
  2909.     :is=\Eb\E[m^O\E[?7h:rs=\Eb\E[m^O\E[?7h\E[H\E[J:
  2910.  
  2911.  
  2912. 1.503: How can I look at PostScript files?  Why is "dpsexec" so lousy?
  2913. From Marc Pawliger (marc@sti.com)
  2914.  
  2915. showps comes with the 1.2.3 (X11R5) version of the X11rte.ext.obj LPP.
  2916. Very nice PS file previewer from Adobe.  Replaces xpsview which came
  2917. with pre-1.2.3 Installed as /usr/lpp/DPS/showps/showps
  2918.  
  2919. From: VRBASS@ATLVMIC1 (Vance R. Bass)
  2920.  
  2921. You can look at PostScript files using either "xpreview" (in the
  2922. optionally installable text formatting services) or you can get
  2923. Ghostscript and Ghostview from a comp.sources.x server and build it
  2924. yourself.
  2925.  
  2926. >From the "xpreview" man page:
  2927. The xpreview command is an AIXwindows 1.2- and Motif 1.1-based
  2928. application that displays output from the troff command on an AIXwindows
  2929. display.  The troff command output file must be prepared for any one of
  2930. the devX100, devX100K or devpsc devices.  The xpreview command also
  2931. displays PostScript language files that begin with %!.
  2932.  
  2933. "dpsexec" is NOT intended to be a full-service document browser, but
  2934. rather a simple DPS code debugger.  If you insist on using it, you can
  2935. edit your PS code to remove the "showpage" (which will reset dpsexec
  2936. and clear the window) to view single-page files.  It does not handle
  2937. multi-page files gracefully.
  2938.  
  2939.  
  2940. 1.504: unix:0 vs `hostname`:0
  2941.  
  2942. 1.) Is there any way to get the machine to check its local host table
  2943.     first without renaming resolv.conf?
  2944.  
  2945. PTF U412845 implements an environment variable to set the resolver
  2946. time out in AIX 3.2.  This allows you to set RES_TIMEOUT to the number
  2947. of seconds before it times out, a failing a DNS query the machine will
  2948. consult /etc/hosts.  
  2949.  
  2950. 2.) How do you tell X applications where you are if the console display 
  2951.     is unix:0?
  2952.  
  2953. From: crow@waterloo.austin.ibm.com (David L. Crow)
  2954.  
  2955.   I would suggest that if you have R5, use ":<display>.<screen>".  I do
  2956.   not believe that R4 clients will understand :0, so I would suggest
  2957.   unix:0 for them.
  2958.  
  2959.   Without specifying unix or the hostname, you will get the fastest
  2960.   transport mechanism.  While currently there are only two transport
  2961.   methods in the AIXwindows X server (Unix sockets and TCP sockets),
  2962.   many vendors are looking at using shared memory as a transport method. 
  2963.   If you use :0 (or :0.0 or :1, etc.), then you should get the best
  2964.   performance regardless of the available transport methods.
  2965.  
  2966. From Marc Pawliger (marc@sti.com)
  2967.   Using "unix:0" or "hostname:0" when the X11 Shared Memory Transport
  2968. (SMT) is installed as part of the 1.2.3 X11rte.obj (X11R5) will incur
  2969. a penalty vs. using ":0" See /usr/lpp/X11/README.SMT
  2970.  
  2971. 3.) Is there a significant performance penalty incurred by using
  2972.     `hostname`:0 as DISPLAY?
  2973.  
  2974.   Yes! Using unix:0, you are using Unix sockets.  These are much faster
  2975.   than their TCP socket counterparts.
  2976.  
  2977.  
  2978. 1.505: VT100 key bindings for aixterm
  2979. From: haedener@iac.unibe.ch (Konrad Haedener)
  2980.  
  2981. Add this to your .Xdefaults file and start your VAX session with
  2982. 'aixterm -v -name vt100 -e telnet MYVAXHOST'
  2983.  
  2984. -----
  2985. vt100.foreground: Wheat
  2986. vt100.background: MidnightBlue
  2987. vt100.font: Rom14.500
  2988. vt100.geometry: 80x25+0+0
  2989. vt100.vt102: true
  2990. vt100.fullcursor: false
  2991. vt100.pointerColor: coral
  2992. vt100.cursorColor: gray100
  2993. vt100.translations:    <Key>F1: string(0x1b) string("OP") \n\
  2994.                        <Key>F2: string(0x1b) string("OQ") \n\
  2995.                        <Key>F3: string(0x1b) string("OR") \n\
  2996.                        <Key>F4: string(0x1b) string("OS") \n\
  2997.                        <Key>KP_0: string(0x1b) string("Op") \n\
  2998.                        <Key>KP_1: string(0x1b) string("Oq") \n\
  2999.                        <Key>KP_2: string(0x1b) string("Or") \n\
  3000.                        <Key>KP_3: string(0x1b) string("Os") \n\
  3001.                        <Key>KP_4: string(0x1b) string("Ot") \n\
  3002.                        <Key>KP_5: string(0x1b) string("Ou") \n\
  3003.                        <Key>KP_6: string(0x1b) string("Ov") \n\
  3004.                        <Key>KP_7: string(0x1b) string("Ow") \n\
  3005.                        <Key>KP_8: string(0x1b) string("Ox") \n\
  3006.                        <Key>KP_9: string(0x1b) string("Oy") \n\
  3007.                        <Key>KP_Divide: string(0x1b) string("OQ") \n\
  3008.                        <Key>KP_Multiply: string(0x1b) string("OR") \n\
  3009.                        <Key>KP_Subtract: string(0x1b) string("OS") \n\
  3010.                        <Key>KP_Add: string(0x1b) string("Om") \n\
  3011.                        <Key>KP_Enter: string(0x1b) string("OM") \n\
  3012.                        <Key>KP_Decimal: string(0x1b) string("On") \n\
  3013.                        <Key>Next: string(0x1b) string("Ol") \n\
  3014.                        <Key>Left: string(0x1b) string("OD") \n\
  3015.                        <Key>Up: string(0x1b) string("OA") \n\
  3016.                        <Key>Right: string(0x1b) string("OC") \n\
  3017.                        <Key>BackSpace : string(0x7f) \n\
  3018.                        <Key>Down: string(0x1b) string("OB")
  3019.  
  3020. You should also add
  3021.  
  3022. XENVIRONMENT=$HOME/.Xdefaults
  3023. export XENVIRONMENT
  3024.  
  3025. to your .profile.
  3026.  
  3027.  
  3028. 1.506: Is there a screen saver that does not use excessive CPU?
  3029.  
  3030. From: buchholz@ese.ogi.edu (Don Buchholz)
  3031.  
  3032. Try using xlock with these options:
  3033.  
  3034.     xlock -mode life -count 1500 -nice 20 -root
  3035.  
  3036.  
  3037. From: pranav@evolving.com (Pranav Vakil)
  3038.  
  3039. Use mlock -hide to hide the background. You can also modify the mlock
  3040. (/usr/local/tools/mlock) code to allow the standard X screen saver to
  3041. take effect. The timeout value is originally set to 0 which means the
  3042. screen saver is off. Modify this to be 120 (2 minutes) and set the
  3043. interval time to be 60 (1 minute). Using these intervals, I have found
  3044. that over a 24 hour period, it uses only .3 cpu minutes.
  3045.  
  3046. 1.507: Where are the colors, availible for an X session, listed.
  3047.  
  3048. /usr/lpp/x_st_mgr/bin/rgb.txt
  3049.  
  3050.  
  3051. 1.508: Why does my app hang the X server but not an X station?
  3052. From: brox@corena.no (Bjorn P. Brox)
  3053.  
  3054. /usr/lpp/X11/README.SMT X client/server communication uses a 64k
  3055. buffer by default.  The size of this buffer is controled by the
  3056. X_SHM_SIZE environment variable increasing the size of the buffer has
  3057. been used to prevent some applications from hanging the X server :)
  3058.  
  3059. 1.509: How do I switch the control and caps lock key bindings?
  3060.  
  3061. If you are running the X window system, you can put the following into
  3062. .xmodmaprc
  3063.  
  3064.   remove Lock = Caps_Lock
  3065.   remove Control = Control_L
  3066.   keysym Control_L = Caps_Lock
  3067.   keysym Caps_Lock = Control_L
  3068.   add Lock = Caps_Lock
  3069.   add Control = Control_L
  3070.  
  3071. 1.510: Missing fonts?
  3072.  
  3073. If your Xserver supports X11R5 try running a font server (edit
  3074. /usr/lib/X11/fs/config and run fsconf && startsrc -s fs) Consult your
  3075. Xserver instructions on how to include a font server in your font
  3076. path.
  3077.  
  3078. 1.511: What's the termcap entry for an IBM 3151 look like?
  3079.  
  3080. #
  3081. # Written by Aleksandar Milivojevic, alex@srce.hr
  3082. # 24.09.1994
  3083. #
  3084. I2|ibm3151|3151|IBM 3151 terminal:\
  3085.     :am:mi:cr=^M:sf=^J:co#80:li#24:cd=\EJ:ce=\EI:cm=\EY%+\040%+\040:\
  3086.     :cl=\EH\EJ:dc=\EQ:dl=\EO:do=\EB:le=\ED:mb=\E4$a:md=\E4(a:\
  3087.     :me=\E4@\E>B:mr=\E4!a:nd=\EC:se=\E4>b:so=\E4!a:ue=\E4=b:up=\EA:\
  3088.     :us=\E4"a:kb=^H:kd=\EB:kh=\EH:kl=\ED:kr=\EC:ku=\EA:\
  3089.     :k1=\Ea\r:k2=\Eb\r:k3=\Ec\r:k4=\Ed\r:k5=\Ee\r:\
  3090.     :k6=\Ef\r:k7=\Eg\r:k8=\Eh\r:k9=\Ei\r:k0=\Ej\r:\
  3091.     :ti=\E>B:te=\E>B:ms:ho=\EH:bl=^G:al=\EN:ta=^I:
  3092.  
  3093.  
  3094. 1.512: Errors starting X11 application binaries from aixpdslib.
  3095. From: ftp://aixpdslib.seas.ucla.edu/pub/README_X11R5_Stuff
  3096.  
  3097. We have been aware of the problem people have with dynamic links
  3098. when running the prebuilt of X-stuffs from this library.
  3099.  
  3100. The typical error messages will be:
  3101.  
  3102.     Could not load program [program_name]
  3103.     Member shr4.o not found or file not an archive
  3104.     Member shr4.o not found or file not an archive
  3105.     Could not load library libXt.a[shr4.o]
  3106.     Error was: No such file or directory
  3107.  
  3108. It's because that we built the programs using X11 libraries of MIT
  3109. which are not compatible with those of IBM.  If this is the case,
  3110. then please get the compressed tarred file of the source code instead,
  3111. and recompile them on your system using your libraries.
  3112.  
  3113.  
  3114. 1.513: .XShm* Link errors building Xwindows applications.
  3115.  
  3116. Link errors that refer to .XShm* often times are a result of compiling
  3117. applications to take advantage of the Shared Memory extension of the X
  3118. server.  You may either compile without shared memory or load the
  3119. shared memory extensions. (see /usr/lpp/X11/README and README.SMT) A
  3120. script for rebuilding your X server with the shared memory can be found
  3121. in /usr/lpp/X11/Xamples/server.
  3122.  
  3123.  
  3124. 1.514: How do I set my DISPLAY when I login to another machine?
  3125.  
  3126. Though this is not a question specific to AIX, it appears often enough
  3127. to warrant an answer here.  There are lots of approaches, some of which
  3128. are described in the X Windows FAQ.  Most involve a little login shell
  3129. programing to parse the output of `who` or `who am i`.
  3130. ftp://boogle.uchicago.edu/pub/aix/src/hostwhence.tar.Z by
  3131. e-siebert@uchicago.edu will help if you are willing/able to install it
  3132. suid.  See the X Windows FAQ and newsgroup for more information.
  3133.  
  3134. ______________________________________________________________________________
  3135. 1.600: My named dies frequently, why?
  3136.  
  3137. Running on 3.2, named dies frequently on network's primary name server.
  3138.  
  3139. From: jpe@ee.egr.duke.edu (John P. Eisenmenger)
  3140.  
  3141. Try the following:
  3142.  
  3143.      stopsrc -s named        # stop running named
  3144.      setenv MALLOCTYPE 3.1    # use 3.1 memory allocation algorithm
  3145.      /etc/named ...        # don't use smit to start named
  3146.  
  3147. You might be able to use startsrc/smit after setting MALLOCTYPE and get
  3148. the same effect, but I'm not sure.
  3149.  
  3150. [According to John, the problem is malloc() in the named code. He
  3151.  also suggests using Berkeley's bind, which he has ported and can be
  3152.  ftp'ed from ftp.egr.duke.edu, /archives/network/bind-4.8.3.tar.Z. -ed]
  3153.  
  3154. Two ptfs should fix this problem. Get U412332 and U414752.
  3155.  
  3156. Christophe Wolfhugel <Christophe.Wolfhugel@grasp.insa-lyon.fr> reports
  3157. that bind 4.9 works fine on AIX 3.2 and without MALLOCTYPE=3.1.
  3158.  
  3159.  
  3160. 1.601: How do I trace ethernet packets on an AIX system?
  3161. From: afx@muc.ibm.de (Andreas Siegert)
  3162.  
  3163. Do the following:
  3164.  
  3165.      iptrace -i en0 /tmp/ipt
  3166.  
  3167. The iptrace backgrounds.  Find its process id and kill it when you are
  3168. ready.  Then run
  3169.  
  3170.      ipreport -rns /tmp/ipt >/tmp/ipr
  3171.  
  3172. and look at the output.  The current version of Info does not document
  3173. the r, n and s options but they are quite useful for layering the output.
  3174.  
  3175.  
  3176. 1.602 What is the authorized way of starting automount at boot time?
  3177. From: curt@ekhadafi.austin.ibm.com (Curt Finch)
  3178.  
  3179. I put this in my /etc/inittab:
  3180.  
  3181. automount:2:once:/usr/etc/automount -T -T -T -v >/tmp/au.se 2>&1
  3182.  
  3183. I hereby dub it authorized.
  3184.  
  3185.  
  3186. 1.603: How do I set a tty port for both dial-in and dial-out?
  3187.  
  3188. Set the mode of the tty to be either 'shared' or 'delayed'. 
  3189.  
  3190.  
  3191. 1.604: How to move or copy whole directory trees across a network
  3192.  
  3193. The following command will move an entire directory tree across a network 
  3194. while preserving permissions, uids and gids.
  3195.  
  3196.       $rsh RemoteHost "cd TargetDir; tar -cBf - ." | tar -xvBf -
  3197.  
  3198. Explanation:
  3199.  
  3200. The tar-create is rsh'd to the remote system and is written to
  3201. stdout (the pipe).
  3202.  
  3203. The local system is extracting the tar that is being read from
  3204. stdin (the pipe).
  3205.  
  3206.  
  3207. 1.605: How can I send mail to hosts that cannot be pinged?
  3208. From: jupiter.sun.csd.unb.ca!dedourek (John DeDourek)
  3209.  
  3210. AIX 3.2 as shipped is configured to only send mail to mail addresses
  3211. which include a host name.  Many organizations use a mail address whose
  3212. "host name" part is not a host name (technically an MX name).  To change
  3213. the configuration of the AIX mailer, login as root.  Then edit the file
  3214. /etc/sendmail.cf to remove the comment marker ("# ") at the beginning of
  3215. the line which reads:
  3216.     # OK MX
  3217.  
  3218. Now rebuild the machine readable form of the configuration with
  3219.     sendmail -bz
  3220.  
  3221. and finally restart signal sendmail to load the new configuration by one
  3222. of the following:
  3223.      reboot
  3224. or
  3225.      stopsrc -s sendmail
  3226.      startsrc -s sendmail
  3227. or 
  3228.      kill -1 `cat /etc/sendmail.pid`
  3229.  
  3230.  
  3231. 1.606: How to configure dialup SLIP
  3232.  
  3233. IBM's WWW home page http://www.ibm.com/ can lead you to a helpful document
  3234. http://www.austin.ibm.com/pub/www/services/aix_service/faxes/SLIP.DOC.zap
  3235.  
  3236. From: marvin@tornado.oche.de (Christian Bode)
  3237.  
  3238. If you don't have problems with slattach you should have PTF 
  3239. bos.obj 3.2.0.0.U411505 installed.  I assume that you did the right
  3240. ifconfig commands to setup your slip-device (for example sl0).
  3241.  
  3242. 1. Create a group called slip.
  3243.  
  3244. 2. Create a user slip with smit like this:
  3245.                                                      [Entry Fields]
  3246. * User NAME                                          [slip]
  3247.   ADMINISTRATIVE User?                                true
  3248.   User ID                                            []
  3249.   LOGIN user?                                         true
  3250.   PRIMARY group                                      [slip]
  3251.   Group SET                                          [slip]
  3252.   ADMINISTRATIVE groups                              [system]
  3253.   SU groups                                          [slip]
  3254.   HOME directory                                     [/home/slip]
  3255.   Initial PROGRAM                                    [/bin/sh]
  3256.   User INFORMATION                                   [SLIP-Dialup]
  3257.   Another user can SU to user?                        false
  3258.   User can RLOGIN?                                    true
  3259.   TRUSTED PATH?                                       nosak
  3260.   Valid TTYs                                         [/dev/tty1]
  3261.   AUDIT classes                                      []
  3262.   PRIMARY authentication method                      [SYSTEM]
  3263.   SECONDARY authentication method                    [NONE]
  3264.   Max FILE size                                      [2097151]
  3265.   Max CPU time                                       [-1]
  3266.   Max DATA segment                                   [262144]
  3267.   Max STACK size                                     [65536]
  3268.   Max CORE file size                                 [2048]
  3269.   Max physical MEMORY                                [65536]
  3270.   File creation UMASK                                [022]
  3271.   EXPIRATION date (MMDDhhmmyy)                       [0]
  3272.  
  3273. 3. Create a tty with getty on it:
  3274.                                    Add a TTY
  3275.                                                [Entry Fields]
  3276.   TTY type                                     tty
  3277.   TTY interface                                rs232
  3278.   Description                                  Asynchronous Terminal
  3279.   Parent adapter                               sa0
  3280. * PORT number                                  [s1]
  3281.   BAUD rate                                    [38400]
  3282.   PARITY                                       [none]
  3283.   BITS per character                           [8]
  3284.   Number of STOP BITS                          [1]
  3285.   TERMINAL type                                [dumb]
  3286.   STATE to be configured at boot time          [available]
  3287.   DMA                                          on
  3288.   Read Trigger                                 0,1,2,3
  3289.   Transmit buffer count                        [16]
  3290.   Name of initial program to run               [/etc/getty]
  3291.  
  3292.   Note: The following attributes are only applicable if /etc/getty is
  3293.         specified as the initial program to run.
  3294.  
  3295.   Enable program?                              respawn
  3296.   Run level                                    2
  3297.   Enable LOGIN                                 share
  3298.   TIME before advancing to next port setting   [0]
  3299.   STTY attributes for RUN TIME                 [hupcl,cread,brkint>
  3300.   STTY attributes for LOGIN                    [hupcl,cread,echoe,>
  3301.   RUN shell activity manager                   no
  3302.   Optional LOGGER name                         []
  3303.  
  3304. 4. Change the hardware characteristics so that it uses NO XON/XOFF handshake
  3305.    section 1.613 also talks about tty flow control.
  3306.  
  3307. 5. Here is the the .profile for User slip to manage dialups
  3308.  
  3309. PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:/usr/local/bin:.
  3310.  
  3311. ENV=$HOME/.kshrc
  3312. HISTSIZE=128
  3313.  
  3314. export PATH ENV HISTSIZE
  3315. #
  3316. # Search for a LCK-File for our tty if there is one
  3317. #
  3318.  
  3319. if test -f /etc/locks/LCK..tty1
  3320. then
  3321.   SHPID=`cat /etc/locks/LCK..tty1`
  3322. else
  3323.  echo `date` " No LCK-File !!!" >>slip.log
  3324.  exit 64
  3325. fi
  3326.  
  3327. #
  3328. # Search for our own Shell to get the PID for checking against LCK-File
  3329. #
  3330.  
  3331. SH2PID=`ps -aef |
  3332.         sed -n -e 's/^ *slip  *\([0-9][0-9]*\) .*-sh *$/\1/p`
  3333.  
  3334. #
  3335. # Is it the the same PID as in the LCK File so that we can start working ??
  3336. #
  3337.  
  3338. if test $SHPID = $SH2PID
  3339. then
  3340. #  remove the LCK-File because slattach does not like it.
  3341.    rm -rf /etc/locks/LCK..tty1
  3342. #  Add RTS/CTS Handshakeing to our own tty
  3343.    stty add rts
  3344. #  Startup slattach. Slattach has to have mode 4755 to be started up !!!
  3345.    /usr/sbin/slattach tty1
  3346. #  Just say that we are up.
  3347.    echo `date` " Starting up slip-daemon " >>slip.log
  3348. #  leave slattach enough time to startup
  3349.    sleep 4
  3350. else
  3351. # Something must be wrong with the LCK-File
  3352.   SH3PID=`ps -aef | awk ' {print $2}' | grep $SHPID`
  3353.  
  3354.   if test ."$SH3PID" = .""
  3355.   then
  3356.     SH3PID="NO_SUCH_PROCESS"
  3357.   fi
  3358.  
  3359.   if test $SHPID = $SH3PID
  3360.     then
  3361. #  There is a living process which owns the LCK-File !!
  3362.        echo `date` " Can't remove LCK-File, not owner !!!" >>slip.log
  3363.        exit 64
  3364.     else
  3365. #   Who the hell didn't remove the LCK-File (should never happen)
  3366.        echo `date` " LCK-File with no owner found !!!" >>slip.log
  3367.        exit 64
  3368.     fi
  3369. fi
  3370.  
  3371. # Get the pid of slattch so that we can kill him later on.
  3372. SLPID=`ps -aef |
  3373.  sed -n -e 's/^ *slip  *\([0-9][0-9]*\) .*-.*\/usr\/sbin\/slattach tty1 *$/\1/p`
  3374.  
  3375. # Kill slattach if we get a signal 1 (Carrier Lost ? / Otherside-slattach
  3376. # terminated )
  3377. trap "kill $SLPID; exit 0" 1
  3378.  
  3379. # We  will have a nice sleep and nice dreamings
  3380. while sleep 256
  3381. do
  3382. :
  3383. done
  3384.  
  3385. Here's another scenario:
  3386. From: oosten@angelo.ee.ualberta.ca (Brian Oostenbrink)
  3387.  
  3388. Operating System: IBM AIX 3.2.1 and 3.2.3
  3389.  
  3390. Configuring two RS6000s via a Serial Line Interface Protocol (SLIP) 
  3391. connection over two US Robotics Sportster 14,400 modems.
  3392.  
  3393. The AIX implementation of SLIP is slightly different from most others. 
  3394. The ifconfig command is used to bring up a serial interface, and the
  3395. slattach command is used to connect the interface to the serial port
  3396. used for the connection.  Dialer device commands can also be issued when
  3397. invoking the slattach command, using UUCP chat syntax.
  3398.  
  3399. The following describes a connection between two machines:
  3400.  
  3401.      local.j.k.l
  3402.          ethernet IP address 129.128.127.21
  3403.          slip interface IP address 129.1.2.1
  3404.  
  3405.      remote.a.b.c
  3406.          ethernet IP address 129.11.22.44
  3407.          slip interface address 129.11.22.1
  3408.  
  3409. 1. Interface configuration
  3410.  
  3411. Each machine must have a separate IP address dedicated to the SLIP
  3412. interface. On remote.j.k.l, start the SLIP interface with:
  3413.  
  3414.          ifconfig sl0 129.11.22.1 129.128.127.1  up
  3415.  
  3416. and on local.a.b.c:
  3417.  
  3418.          ifconfig sl0 129.128.127.1 129.11.22.1  up
  3419.  
  3420. It is important in later versions of AIX 3.2.3+ to use the same SLIP
  3421. interface # as the ptty port #, ie. if you use tty12, use ifconfig sl12
  3422. instead of sl0.
  3423.  
  3424. At this point the interfaces are ready to be connected.
  3425.  
  3426. 2. tty configuration
  3427.    The tty ports on both machines were configured in an identical manner
  3428.    using smit.
  3429.                                                  [Entry Fields]
  3430.  TTY type                                           tty
  3431.  TTY interface                                      rs232
  3432.  Description                                        Asynchronous Terminal
  3433.  Parent adapter                                     sa0
  3434.  PORT number                                        []                       +
  3435.  BAUD rate                                          [38400]                  +
  3436.  PARITY                                             [none]                   +
  3437.  BITS per character                                 [8]                      +
  3438.  Number of STOP BITS                                [1]                      +
  3439.  TERMINAL type                                      [dumb]
  3440.  STATE to be configured at boot time                [available]              +
  3441.  DMA                                                on                       +
  3442.  Read Trigger                                       0,1,2,3
  3443.  Transmit buffer count                              [16]                      #
  3444.  Name of initial program to run                     [etc/getty]
  3445.  
  3446.  Note: The following attributes are only applicable if /etc/getty is specified
  3447.  as the initial program to run.
  3448.  
  3449.  Enable program?                                    respawn
  3450.  Run level                                          2
  3451.  Enable LOGIN                                       disable                  +
  3452.  TIME before advancing to next port setting         [0]                      +#
  3453.  STTY attributes for RUN TIME                       [hupcl,cread,brkint,icr>
  3454.  STTY attributes for LOGIN                          [hupcl,cread,echoe,cs8,>
  3455.  RUN shell activity manager                         no                       +
  3456.  Optional LOGGER name                               []
  3457.  
  3458. On older versions of AIX, we encountered some problems disabling getty, and
  3459. resorted to changing the /etc/inittab file directly. For example, change
  3460.  
  3461.    tty0:2:respawn:/etc/getty /dev/tty0
  3462. to
  3463.    tty0:2:off:/etc/getty /dev/tty0
  3464.  
  3465. This will disable getty from running. After creating the SLIP tty device,
  3466. you will need to change its hardware configuration to disable Xon/Xoff
  3467. flow control. Software flow control should not be used for SLIP. Type
  3468. 'smit chtty', and then select sub item 2: Hardware settings.
  3469.  
  3470. Most of the parameters in the tty configuration are the defaults.
  3471.  
  3472. 3. Modem Configuration
  3473.  
  3474.    The modems were configured as follows:
  3475.  
  3476.    RTS/CTS flow control enabled.
  3477.    Xon/Xoff software flow control disabled. Usually this is automatic if
  3478.       RTS/CTS is enabled.
  3479.    Data rate, terminal to modem = fixed.
  3480.       This is the baud rate from the tty port to the modem. We used a
  3481.       fixed modem-port transfer rate, set to the fastest speed supported
  3482.       by both the tty port and the modem. Newer modems can use a higher
  3483.       transfer rate between the modem and serial port than the modem to
  3484.       modem rate, which is necessary to use data compression effectively.  
  3485.       In our setup, we used 14.4 kBaud modems with a port speed of 38.4
  3486.       kBaud. If your modem supports this feature, use it, otherwise set
  3487.       the port speed equal to the modem connection rate. On the USR
  3488.       Sportster at&b1 fixes the serial port rate to that of the last
  3489.       AT command. The speed parameter of the slattach command can be
  3490.       used to ensure that this rate is that set in the tty configuration.
  3491.    Error Correction enabled - not mandatory, but a good idea
  3492.    Data Compression - not required, but it helps, especially for text
  3493.       transfers.
  3494.    Auto Answer - If the SLIP connection is to be initiated from either
  3495.       machine, both modems should be set to auto answer, otherwise, just
  3496.       the answering modem.
  3497.  
  3498.    It is a good idea to configure the modem and then save the settings
  3499.    to NVRAM, so that the correct settings can always be restored by the
  3500.    slattach command.
  3501.  
  3502. 4. UUCP configuration files
  3503.  
  3504.    /usr/lib/uucp/Devices
  3505.    /usr/lib/uucp/Dialers
  3506.  
  3507.    The Devices file must contain an entry with the tty and serial port
  3508.    speed used for the interface. In our example,
  3509.       Direct tty0 38400 slipdialer
  3510.  
  3511.    The keyword 'slipdialer' is merely an index into the Dialers file.
  3512.    For our purposes, the slipdialer entry in the Dialers file is simply:
  3513.  
  3514.       slipdialer
  3515.  
  3516.    This entry can also contain UUCP chat commands, or the chat commands
  3517.    can be included in the slattach command.
  3518.  
  3519. 5. slattach invocation
  3520.  
  3521.    slattach connects the device on the tty port to the SLIP interface
  3522.    created by ifconfig, and sends any commands to the tty device if
  3523.    needed. For our example, remote.j.k.l would never initiate a call,
  3524.    only answer incoming calls. Therefore we execute:
  3525.  
  3526.          slattach tty0 38400 '"" ATZ OK ""'
  3527.  
  3528.    which connects the tty at 38400 baud. We could also simply run
  3529.  
  3530.          slattach tty0
  3531.  
  3532.    ie. without any modem commands, but the modem to port speed may not
  3533.    be correctly set this way. In addition, the ATZ command ensures the
  3534.    modem is set to the NVRAM settings.
  3535.  
  3536.    On local.a.b.c type:
  3537.  
  3538.          slattach tty0 38400 '"" ATZ OK \pATDT4925871 BIS ""' 4
  3539.  
  3540.    This establishes the link at 38400 baud, and executes the dial string
  3541.    as shown. The dial string is a UUCP chat string and are configured
  3542.    in an expect send expect send ... format. The string:
  3543.  
  3544.          '"" ATZ OK \pATDT4925871 BIS ""'
  3545.  
  3546.    is interpreted as:
  3547.    expect "" (null string) from modem
  3548.    send   ATZ              to modem
  3549.    expect OK               from modem
  3550.    send   \pATDT4925871    to modem
  3551.    expect BIS              from modem
  3552.  
  3553.    BIS is the end of the CONNECT STRING. You could use any portion of
  3554.    the string returned by the modem upon a connection as the expect
  3555.    string. It may be wiser to simply expect CONNECT since all
  3556.    connections should return this string.
  3557.    The null strings are necessary because the first parameter of the
  3558.    UUCP is an expected string from the modem, which can only be a null
  3559.    string until the modem has been given a command.
  3560.  
  3561.    The last parameter (4) of the slattach command is the debug level. 
  3562.    A debug level of 4 displays the UUCP chat strings, which is useful
  3563.    for checking the modem status.
  3564.  
  3565. 6. Routing
  3566.    ifconfig is sufficient if all you want to do is talk between the
  3567.    two hosts.  If you are running SLIP so that you can talk to more
  3568.    than just that one other host you have to advertise your address.
  3569.    
  3570.    1) arp -s 802.5 iago 10:00:5a:b1:49:d8 pub
  3571.         where 802.5 is a token-ring network the hardware address can
  3572.         be obtained with `netstat -v` and iago was the SLIP client (My
  3573.         PC at home :)  pub is the important part it means "published"
  3574.         You may want to run this at boot time. 
  3575.  
  3576.    Routing through the SLIP link is similiar to routing of any gateway. 
  3577.    Invoking the ifconfig command automatically sets up a route between
  3578.    the two SLIP machines. An entry in /etc/hosts or the named database
  3579.    should be made, with the same machine name used for the SLIP address
  3580.    as the ethernet address on each machine. For example, in /etc/hosts
  3581.    on remote.a.b.c (and any other machine on remote.a.b.c ethernet):
  3582.  
  3583.      129.11.22.44 remote.a.b.c # ethernet address
  3584.      129.11.22.1  remote.a.b.c # slip address
  3585.  
  3586.    It is preferable to place the ethernet address in the hosts file
  3587.    before the SLIP address so remote.a.b.c will resolve to the
  3588.    ethernet address. When using named, it is important to have both
  3589.    addresses in the reverse file with the same name. We experienced
  3590.    difficulties with NFS mounting over the slip link, owing to some
  3591.    machine interpreting NFS requests from one of the two SLIP machines
  3592.    as coming from the SLIP address, while the SLIP machine believed it
  3593.    was sending the request from the ethernet address. This problem was
  3594.    eliminated by having both addresses reverse resolve to the same name.
  3595.  
  3596. 7. Performance
  3597.    At a modem speed of 14.4 kBaud and a port speed of 38.4 kBaud, we
  3598.    realized a transfer rate through ftp of about 3.5 kB/s for text
  3599.    files, and 1.3 kB/s for compressed files.
  3600.  
  3601.  
  3602. 1.607: Where is DCE discussed?
  3603. From: brent@uwovax.uwo.ca (Brent Sterner)
  3604.  
  3605. DCE is the Distributed Computing Environment, which is roughly a
  3606. flexible client-server architecture for heterogenous platforms.
  3607. For more information, take a look in comp.unix.osf.misc. 
  3608.  
  3609.  
  3610. 1.608: How do I make /var/spool/mail mountable?
  3611. From: petersen@pi1.physik.uni-stuttgart.de (Joerg Petersen)
  3612.  
  3613. In our cluster we share a /usr/local disk. We have a directory
  3614. /usr/local/spool/mail and /var/spool/mail is soft-linked to it.
  3615.  
  3616. From: fred@hal6000.thp.Uni-Duisburg.DE (Fred Hucht)
  3617.  
  3618. Several problems has been reported on sharing the mail directory via
  3619. NFS. The problems may occur when two or more sendmail daemons and/or
  3620. mail readers access a user's mail file simultanously, because of NFS'
  3621. file locking mechanism.
  3622.  
  3623. We use another method here: Every user has one line in his/her
  3624. $HOME/.forward file that reads
  3625.  
  3626. xxx@mainserver.domain.name
  3627.  
  3628. where xxx is the user node and mainserver.domain.name is the full
  3629. hostname of one of the machines. Then all incoming mail to all machines
  3630. is forwarded to mainserver, while mainserver ignores this line.
  3631.  
  3632.  
  3633. 1.609: getty spawning too rapidly 
  3634. thanks to aslam@abaseen.lums.edu.pk (Sohail Aslam)
  3635.  
  3636. The problem can occur due a number of modem settings. The most
  3637. frequent is that the echo is not disabled on modems that are to
  3638. accept incoming calls. In hayes language, ATE0 disables echo.
  3639. If echo is enabled, the login prompt sent by the DTE (computer)
  3640. is echoed back to it. It then issues "password:" prompt which
  3641. the modem conveniently echoes back again. And the cycle goes on.
  3642.  
  3643. Another setting to check is the Q registers which controls the
  3644. modem's response to the DTE. The hayes command ATQ0 enables
  3645. results codes. The Q register in conjunction with the X and
  3646. the V registers, reports back to the DTE the status of the incoming
  3647. or outgoing call, and the type of connection established. For
  3648. outgoing calls, one would want to enable result codes but not
  3649. for incoming calls. If codes are enabled (via ATQ0), when a
  3650. call comes in, the modem will send strings (if ATV1 and ATX4 set)
  3651. "RINGING", "CONNECTED" etc. to the local DTE. The getty will think
  3652. some one is trying to login. It will send password prompt. Trouble
  3653. again. Telebit and other intelligent modems has ATQ2 setting
  3654. which says "reports codes only when calling out." For others,
  3655. you will need to disable it (ATQ1) and enable when calling out.
  3656.  
  3657. The DSR setting can be a source of problem. Ideally, modem should
  3658. raise DSR only when CD is detected and modem raises CTS. Computer,
  3659. such as the VAX, wait 30 seconds after the modem raises DSR. If
  3660. CD is not on by that time, the computer will drop DTR causing the
  3661. modem to reset. The DSR should be set to be raised only when
  3662. carrier has been detected. The hayes setting is AT&S1.
  3663.  
  3664. The DCD setting should be such that it reflects the true nature of
  3665. the carrier. The CD can be forced on at all times (AT&C0). This
  3666. is not good. Set it to AT&C1.
  3667.  
  3668. Most modems can reload saved settings from non-volatile memory
  3669. on a DTR transition. This is useful for resetting the modem
  3670. when a call drops. Use AT&D3 to get this effect. 
  3671.  
  3672. For dial in, thus, set AT E0 Q1 &C1 &D3 &S1 &W. The &W stores the
  3673. settings in memory. They will be reloaded due to &D3.
  3674.  
  3675.  
  3676. 1.610: Does AIX support Compressed SLIP (CSLIP)?
  3677.  
  3678. No.  That means no VJ compression either :)  See PPP in section 5.07 
  3679. if you want more than standard SLIP.
  3680.  
  3681.  
  3682. 1.611: How do I setup anonymous ftp on my AIX system?
  3683. (stolen from Peter Klee <klee@dhdibm1.bitnet> posting)
  3684.  
  3685. Have a look at '/usr/lpp/tcpip/samples/anon.ftp'. It is a shell script
  3686. and will set up a anonymous ftp site on your local RS/6000.  Note: the
  3687. ftpd that comes with AIX does not support the display messages every
  3688. time a user changes a directory or even when they login.
  3689.  
  3690. 1.612: Talk, getting notification.
  3691.  
  3692. If you are not getting notification (that someone wants to talk to
  3693. you), use (swcons `tty` && mesg y) in one window.
  3694.  
  3695. There are many variations of 'talk' and finding compatible versions
  3696. for multiple operating systems can be tricky.
  3697.  
  3698. 1.613: Disabling software flow control; using RTS/CTS.
  3699.  
  3700. Different versions of AIX 3.2.5 respond differently to attempts to
  3701. enable flow control (RTS/CTS signals).  This section is an attempt to
  3702. compile a list of different approaches.
  3703.  
  3704. The most straight forward is:
  3705.    chdev -l ttyxx -a rts=yes
  3706.    [ Note: ix40410 for AIX 3.2.5 should give you this functionality.  
  3707.    PTF U426113 and numerous other superceding ptfs should provide this.]
  3708.  
  3709. If carrier signal is high (its connected) you can try
  3710.    stty add rts </dev/ttyxx 
  3711.  
  3712. There is also a program that I first saw on the 800-IBM-4FAX number,
  3713. also found in INFO that will remedy the situation in some cases.  Note
  3714. that this code ignores the return code from ioctl (which on my machine
  3715. is <0 :)
  3716.  
  3717. /* This program is an adaptation of a program provided by IBM Defect Support.
  3718.    It is provided without warrantee, or support.
  3719.  
  3720.    The syntax of the command is:
  3721.  
  3722.     setrts tty [tty [tty [...]]]
  3723.  
  3724.    The program will loop through each tty provided on the command line, and 
  3725.    turn on the 'rts' line discipline.  The program does not require that
  3726.    the Carrier Detect signal be held high to keep the serial device from 
  3727.    blocking on the attempt to open it.  The program works for all valid ttys.
  3728.  
  3729.    BUGS: None that are known; however, using the program to set 'ptys' may
  3730.    cause the 'pty' to become unusable.
  3731.  
  3732.    This program was written by Robin D. Wilson, Pencom Software (with the
  3733.    specific 'ioctl()' call provided by the IBM Defect Support Center.
  3734.  
  3735.    I call it: "setrts"
  3736.    
  3737.    To compile:
  3738.    cc -O -o setrts setrts.c
  3739.    strip setrts
  3740.    
  3741.    (Funny, but if you strip with the compiler (i.e., cc -s), you end up with
  3742.    120 extra bytes in the executable...)
  3743. */
  3744.  
  3745. #include <stdio.h>
  3746. #include <fcntl.h>
  3747. #include <termios.h>
  3748. #include <sys/tty.h>
  3749. #include <string.h>
  3750. #include <sys/param.h>
  3751. #include <unistd.h>
  3752.  
  3753. #define DEVDIR        "/dev/"
  3754. #define    LINEDISP    "rts"
  3755.  
  3756. main (argc, argv)
  3757. int argc;
  3758. char **argv;
  3759. {
  3760.     int tty;
  3761.     char ttyname[MAXPATHLEN];
  3762.  
  3763. /*    Give a 'usage' recommendation if they don't provide an argument */
  3764.     if (argc < 2) {
  3765.        fprintf(stderr, "usage: %s <ttyn> [ttyn [ttyn [...]]]\n",argv[0]);
  3766.        exit(-1);
  3767.     }
  3768.  /*    Otherwise, loop through all the arguments... */
  3769.     else while (--argc >= 1) {
  3770.         argv++;
  3771.  /*    Check to see if they input the 'tty' names with the DEVDIR on them...
  3772.  *    If not, put it on...
  3773.  */
  3774.         if (strncmp(DEVDIR, argv[0], strlen(DEVDIR)) != 0) {
  3775.             strcpy(ttyname, DEVDIR);
  3776.             strcat(ttyname, argv[0]);
  3777.         }
  3778.         else
  3779.             strcpy(ttyname, argv[0]);
  3780.  
  3781. /*    Open the tty.  Use the non-blocking open (O_NDELAY) to open without a 
  3782.  *    carrier (CD) present on the line...
  3783.  */
  3784.         if ((tty = open(ttyname, O_RDWR|O_NDELAY)) < 0) {
  3785.            fprintf(stderr, "%s: couldn't open tty device.\n",ttyname);
  3786.            exit (-2);
  3787.         }
  3788.  /*    Add the 'rts' line discipline... */
  3789.         (void)ioctl(tty, TXADDCD, LINEDISP);
  3790.         (void)close(tty);
  3791.     }
  3792. }
  3793.  
  3794.  
  3795. 1.614+ NIS security
  3796. Ole.H.Nielsen@fysik.dtu.dk (Ole Holm Nielsen)
  3797.  
  3798. SUMMARY: AIX 3.2.4 and above includes support for a more secure setup
  3799. of the ypserv NIS daemon.  You can prevent any random host on the
  3800. entire Internet from reading your NIS maps, as is possible with the
  3801. default AIX setup.
  3802.  
  3803. The details:
  3804. ------------
  3805. After starting the ypserv daemon, I noticed in the syslog the following line:
  3806. Jan 17 12:01:18 zeise syslog: /usr/etc/ypserv: no /var/yp/securenets file 
  3807. This indicates that ypserv is looking for the mentioned configuration
  3808. file, but did not find it, and hence will deliver the NIS maps to
  3809. anyone on the net who can guess the NIS domainname.  I installed the
  3810. /var/yp/securenets file and restarted ypserv, and it works !  Any
  3811. illegal attempt to read NIS maps will result in the following getting
  3812. logged to syslog (example):
  3813. Jan 18 13:37:27 zeise syslog: ypserv: access denied for 129.142.6.79 
  3814.  
  3815. How to enable this NIS security option:  
  3816. Install the /var/yp/securenets file, for example:
  3817.  
  3818. # /var/yp/securenets file
  3819. #
  3820. # The format of this file is one of more lines of
  3821. # netmask netaddr
  3822. # Both netmask and netaddr must be dotted quads.
  3823. #
  3824. # Note that for a machine with two Ethernet interfaces (i.e. a gateway
  3825. # machine), the IP addresses of both have to be in /var/yp/securenets.
  3826. #
  3827. # for example:
  3828. #255.255.255.0 128.185.124.00
  3829. # Loopback interface
  3830. 255.255.255.255 127.0.0.1
  3831.  
  3832. Uncommenting the last line would limit access to hosts on the
  3833. 128.185.124.*  net, only.  The loopback interface must be included, as
  3834. shown above.
  3835.  
  3836. To log violations, have a /etc/syslog.conf file containing the proper
  3837. events.  We use this line:
  3838.  
  3839. *.err;kern.debug;auth.notice;user.none          /var/adm/messages
  3840.  
  3841. Caveat emptor:  This works for us, and you will have to verify it at
  3842. your own installation.  Don't complain to us if you have troubles.  
  3843. I do not know what PTF level our AIX 3.2.4 is at.  Our ypserv daemon 
  3844. looks like this:
  3845.  
  3846. zeise> strings /usr/lib/netsvc/yp/ypserv | head -2
  3847. @(#)16
  3848. 1.12  com/cmd/usr.etc/yp/ypserv.c, cmdnfs, nfs325, 9334325a 5/4/93 19:44:41
  3849.  
  3850. If your AIX doesn't have securenets support, ask your support centre
  3851. for the PTF which includes APAR IX32328.  That seems to have included
  3852. the securenets support.
  3853.  
  3854. ______________________________________________________________________________
  3855. 1.701: How do I shrink /usr?
  3856. From: mike@bria.UUCP (Michael Stefanik) and Richard Hasting
  3857.  
  3858. FOR AIX 3.1
  3859. -----------
  3860.  
  3861.  1) Make a backup of /usr
  3862.  
  3863.         find /usr -print | backup -ivf /dev/rmt0 (or appropriate device)
  3864.  
  3865.  2) shutdown to maintenance mode
  3866.  
  3867.         shutdown -Fm
  3868.  
  3869.  3) export LANG=C
  3870.  
  3871.  4) remove the filesystem and the logical volume
  3872.     ignore an error about the "dspmsg" command not found
  3873.  
  3874.         umount /usr
  3875.         rmfs /usr
  3876.  
  3877.  5) make a new logical volume hd2 and place it on rootvg with desired size
  3878.  
  3879.         mklv -yhd2 -a'e' rootvg NNN 
  3880.  
  3881.    where NNN is the number of 4 meg partitions
  3882.  
  3883.  6) create a filesystem on /dev/hd2
  3884.  
  3885.         crfs -vjfs -dhd2 -m'/usr' -Ayes -p'rw'
  3886.  
  3887.  7) mount the new /usr filesystem and check it
  3888.  
  3889.         /etc/mount /usr
  3890.         df -v
  3891.  
  3892.  8) restore from the tape; system won't reboot otherwise
  3893.  
  3894.         restore -xvf/dev/rmt0
  3895.  
  3896.  9) Sync and reboot the system; you now have a smaller /usr filesystem
  3897.  
  3898. FOR AIX 3.2
  3899. -----------
  3900.  
  3901.  0)  Experiances posted to comp.unix.aix lead me to suggest that
  3902.      many administrators find the following piece of information 
  3903.      useful after completing this procedure.  I thought some of you
  3904.      might like to read it BEFORE getting yourself into this
  3905.      predicament.  
  3906.  
  3907.      Call 1-800-IBM-4FAX and request document 2503 dated 1/26/94.  
  3908.      Title is "How to recover if all files are owned by root after
  3909.      restoration from a mksysb tape".
  3910.  
  3911.  1) Remove any unneeded files from /usr.
  3912.  
  3913.  2) Make sure all filesystems in the root volume group are mounted. If
  3914.     not, they will not be included in the re-installed system.
  3915.  
  3916.  3) Type mkszfile. This will create /.fs.size that contains a list of
  3917.     the active filesystems in the root volume group that will be
  3918.     included in the installation procedure.
  3919.  
  3920.  4) Edit .fs.size. Change the size of /usr to what you want.
  3921.  
  3922.     Example: This .fs.size file shows /usr to be 40MB.
  3923.  
  3924.     rootvg 4 hd2 /usr 10 40 jfs
  3925.  
  3926.     The 10 is the number of physical partitions for the filesystem and
  3927.     the 40 is 40 MB. Most systems have a physical partition size of 4 MB.
  3928.     Therefore, the second number (40) will always be 4 times the
  3929.     previous number (10). Note, however, that a model 320 with a 120 MB
  3930.     drive will have a physical partition size of only 2 MB, and the
  3931.     total MB is twice the number of physical partitions. The first
  3932.     number (4) in the .fs.size file represents the PP size.
  3933.  
  3934.     If you want to reduce the size of /usr from 40 MB to 32 MB, edit the
  3935.     /usr entry to:
  3936.  
  3937.         rootvg 4 hd2 /usr 8 32 jfs
  3938.  
  3939.     IMPORTANT: Make sure that you DO NOT enter a value which is less
  3940.     than the size of the filesystem required to contain the current
  3941.     data. Doing so will cause the re-installation procedure to fail.
  3942.  
  3943.  5) chdev -l rmt0 -a block=512 -T
  3944.  
  3945.  6) Unmount all filesystems that are NOT in the root volume group.
  3946.  
  3947.  7) Varyoff all user-defined volume groups, if any
  3948.  
  3949.         varyoffvg VGname
  3950.  
  3951.  8) Export the user-defined volume groups, if any
  3952.  
  3953.         exportvg VGname
  3954.  
  3955.  9) With a tape in the tape drive, type
  3956.  
  3957.         mksysb /dev/rmt0
  3958.  
  3959.      This will do a complete system backup, which will include
  3960.      information (in the .fs.size file) for the installation procedure
  3961.      on how large the filesystems are to be created.
  3962.  
  3963.  10) Follow the instructions in the Installation Kit under "How to
  3964.      Install and perform maintenance from Diskettes" (reportedly now 
  3965.      called "BOS Installation from a System Backup") using the
  3966.      diskettes and tape that you created in the previous steps.
  3967.  
  3968.      [ pre AIX 325: DO NOT select the option "Reinstall AIX with
  3969.      Current System Settings". Instead use "Install AIX with Current
  3970.      System Settings" for the logical volume size changes to take affect. ]
  3971.  
  3972.      [ w/ AIX 325: Select "Install from a mksysb image" ]
  3973.  
  3974.  11) When the installation is complete, you may then import any
  3975.      user-defined volume groups.
  3976.  
  3977.          importvg -y VGname PVname
  3978.  
  3979.      where "VGname" is the name of the volume group, and "PVname" is
  3980.      the name of any one of the physical volumes in the volume group.
  3981.  
  3982.  12) Varyon your user-defined volume groups
  3983.  
  3984.          varyonvg VGname
  3985.  
  3986.  The reduction of the filesystems is now complete.
  3987.  
  3988.  
  3989. 1.702: How do I make a filesystem larger than 2Gb?
  3990.  
  3991. With AIX 4.1 IBM allows filesystems up to 64Gb (reference:
  3992. http://www.austin.ibm.com/announce.0725.html).  Individual files are
  3993. still limited to 2Gb.
  3994.  
  3995. If you are having trouble creating a file greater than 1Mb it maybe
  3996. because that is the default limit for your account, see 'smit users'
  3997. or /etc/security/limit.
  3998.  
  3999. The largest filesystem under AIX is 2 Gigabytes because the largest
  4000. signed integer is 2**31 - 1.  This means that AIX 3.2.5 an versions
  4001. preceeding it are limited to 2Gb filesystems.  This obviously does not
  4002. include "non-filesystems"
  4003.  
  4004.  
  4005. 1.703: Chlv warning.  Is the first 4k of a LV safe?
  4006.  
  4007. The first 4k of a raw LV are used to store control block.
  4008. Applications that write to the raw disk can overwrite this section
  4009. (common applications that do this are Oracle and Sybase).  Commands
  4010. that call getlvcb will generate a warning but succeed (since the
  4011. control block exists in ODM.  Don't run synclvodm unless you really
  4012. want to erase the first 4k and replace it with the info from the ODM.
  4013.  
  4014. shieh@austin.ibm.com (Johnny Shieh) has kindly provided the following
  4015. explanation:
  4016.  
  4017. The logical volume control block (lvcb) is the first 512 bytes of a
  4018. logical volume.  This area holds important information such as the
  4019. creation date of the logical volume, information about mirrored
  4020. copies, and possible mount points in a journaled filesystem.  Certain
  4021. LVM commands are required to update the lvcb, as part of completeness
  4022. algorithms in LVM.  The old lvcb area is first read and analyzed to
  4023. see if it is a valid lvcb.  If the information is verified as valid
  4024. lvcb information, then the lvcb is updated.  If the information is not
  4025. valid, then the lvcb update is not performed and the user is given the
  4026. warning message:
  4027.  
  4028.     Warning, cannot write lv control block data
  4029.  
  4030. Most of the time, this is a result of database programs accessing the
  4031. raw logical volumes (and thus bypassing the journaled filesystem) as
  4032. storage media.  When this occurs, the information for the database is
  4033. literally written over the lvcb.  Although this may seem fatal, it is
  4034. not the case.  Once the lvcb has been overwritten, the user can still:
  4035.  
  4036.     1) Extend a logical volume
  4037.     2) Create mirrored copies of a logical volume
  4038.     3) Remove the logical volume
  4039.     4) Create a journaled filesystem with which to mount the logical
  4040.         volume (note that this will destroy any data sitting in
  4041.         the lvcb area)
  4042.  
  4043. However, there is a limitation caused by this deletion of the lvcb.
  4044. The logical volumes with deleted lvcb's face possible, incomplete
  4045. importation into other AIX systems.  During an "importvg", the LVM
  4046. command will scan the lvcb's of all defined logical volumes in a
  4047. volume group for information concerning the logical volumes.
  4048. Surprisingly, if the lvcb is deleted, the imported volume group will
  4049. still define the logical volume to the new AIX system which is
  4050. accessing this volume group, and the user can still access the raw
  4051. logical volume.  However, any journaled filesystem information is lost
  4052. and the logical volume and its associated mount point won't be
  4053. imported into the new AIX system.  The user must create new mount
  4054. points and the availability of previous data stored in the filesystem
  4055. is NOT assured.  Additionally, all copies of the logical volume
  4056. (mirrors), except the original copy are lost and the user must
  4057. recreate the logical volume copies.  Finally, with an erased lvcb, the
  4058. output from the "lslv" command might be misleading or unreliable.
  4059.  
  4060.  
  4061. 1.704: What's the limit on Physical Partitions Per Volume Group?
  4062. From: shieh@austin.ibm.com (Johnny Shieh)
  4063.  
  4064. In the design of LVM, each Logical Partition maps to one Physical
  4065. Partition.  And, each Physical Partition maps to a number of disk
  4066. sectors.  The design of LVM limits the number of Physical Partitions
  4067. that LVM can track per disk to 1016.  In most cases, not all the
  4068. possible 1016 tracking partitions are used by a disk.  The default
  4069. size of each Physical Partition during a "mkvg" command is 4 MB, which
  4070. implies that individual disks up to 4 GB can be included into a volume
  4071. group.
  4072.  
  4073. If a disk larger than 4 GB is added to a volume group (based on usage
  4074. of the default 4 MB size for Physical Partition) the disk addition
  4075. will fail with a warning message the the Physical Partition size needs
  4076. to be increased.* There are two instances where this limitation will
  4077. be enforced.  The first case is when the user tries to use "mkvg" to
  4078. create a volume group where the number of physical partitions on one
  4079. of the disks in the volume group would exceed 1016.  In this case, the
  4080. user must pick from the available Physical Partition ranges of:
  4081.  
  4082. 1, 2, (4), 8, 16, 32, 64, 128, 256
  4083.  
  4084. Megabytes and use the "-s" option to "mkvg".  The second case is where
  4085. the disk which violates the 1016 limitation is attempting to join a
  4086. pre-existing volume group with the "extendvg" command.  The user can
  4087. either recreate the volume group with a larger Physical Partition size
  4088. (which will allow the new disk to work with the 1016 limitation) or
  4089. the user can create a standalone volume group (consisting of a larger
  4090. Physical Partition size) for the new disk.
  4091.  
  4092. In AIX 4.1 and 3.2.5, if the install code detects that the rootvg
  4093. drive is larger than 4 GB, it will change the "mkvg -s" value until
  4094. the entire disk capacity can be mapped to the available 1016 tracks.**
  4095. This install change also implies that all other disks added to rootvg,
  4096. regardless of size, will also be defined at that new Physical
  4097. Partitions size.
  4098.  
  4099. * This bug was fixed in apar ix48926.  Current AIX 3.2.5 and 4.1.1,
  4100. which do not have this fix on applied, will allow the creation of
  4101. volume groups with more than 1016 partitions.  The implication of this
  4102. bug allowing more than 1016 physical partitions is that the user may
  4103. access all portions of the logical volume.  However during disk
  4104. mirroring, the status of partitions beyond the 1016 limit will not be
  4105. tracked correctly.  If mirrors beyond the 1016 range become "stale",
  4106. LVM will not be aware of their condition and data consistency may
  4107. become an issue for those partitions.  Additionally, the "migratepv"
  4108. command creates mirrors and deletes them as a method for moving
  4109. logical volumes around within/between disks.  If the 1016 limit is
  4110. violated, then the "migratepv" command may not behave correctly.
  4111.  
  4112. ** This bug was fixed for AIX 3.2.5 rootvg install in apars ix46862
  4113. and ix46863.  This bug does not exist in AIX 4.1.1.
  4114.  
  4115.  
  4116. 1.705: Why am I having trouble adding another disk to my VG?
  4117. From: shieh@austin.ibm.com (Johnny Shieh)
  4118.  
  4119. In some instances, the user will experience a problem adding a new
  4120. disk to an existing volume group or in the creation of a new volume
  4121. group.  The warning message provided by LVM will be:
  4122.  
  4123.     Not enough descriptor space left in this volume group.  Either
  4124.     try adding a smaller PV or use another volume group.
  4125.  
  4126. On every disk in a volume group, there exists an area called the
  4127. Volume Group Descriptor Area (VGDA).  This space is what allows the
  4128. user to take a volume group to another AIX system and "importvg" that
  4129. volume group into that AIX system.  The VGDA contains the names of
  4130. disks that make up the volume group, their physical sizes, partition
  4131. mapping, logical volumes that exist in the volume group, and other
  4132. pertinent LVM management information.
  4133.  
  4134. When the user creates a volume group, the "mkvg" command defaults to
  4135. allowing the new volume group to have a maximum of 32 disks in a
  4136. volume group.  However, as bigger disks have become more prevalent,
  4137. this 32 disk limit is usually not achieved because the space in the
  4138. VGDA is used up faster, as it accounts for the capacity on the bigger
  4139. disks.  This maximum VGDA space, for 32 disks, is a fixed size which
  4140. is part of the LVM design.  Large disks require more management
  4141. mapping space in the VGDA, which causes the number and size of
  4142. available disks to be added to the existing volume group to shrink.
  4143. When a disk is added to a volume group, not only does the new disk get
  4144. a copy of the updated VGDA, but all existing drives in the volume
  4145. group must be able to accept the new, updated VGDA.
  4146.  
  4147. The exception to this description of the maximum VGDA is rootvg.  In
  4148. order to provide AIX users more free space, when rootvg is created,
  4149. "mkvg" does not use the maximum limit of 32 disks that are allowed
  4150. into a volume group.  Instead, the number of disks picked in the
  4151. install menu of AIX is used as the reference number by "mkvg -d"
  4152. during the creation of rootvg.  This limit does not mean the user
  4153. cannot add more disks to rootvg in the post-install phase.  The amount
  4154. of free space left in a VGDA, and thus the number of size of the disks
  4155. added to a volume group, depends on the size and number of disks
  4156. already defined for a volume group.  However, this smaller size during
  4157. rootvg creation implies that the user will be able to add fewer disks
  4158. to rootvg than compared to a non-rootvg volume group.
  4159.  
  4160. If the customer requires more VGDA space in the rootvg, then they
  4161. should use the "mksysb" and "migratepv" commands to reconstruct and
  4162. reorganize their rootvg (the only way to change the "-d" limitation is
  4163. recreation of the rootvg).
  4164.  
  4165. Note:  It is always strongly recommended that users do not place user data
  4166. onto rootvg disks.  This separation provides an extra degree of system
  4167. integrity.
  4168.  
  4169. ______________________________________________________________________________
  4170. 1.900: SCSI-1 and SCSI-2 "interoperability" got you confused?  
  4171.  
  4172. A.  SCSI-1 devices are supported on a SCSI-2 adapter.  This
  4173.     config will provide SCSI-1 performance.
  4174.  
  4175. B.  SCSI-2 devices are supported on a SCSI-1 adapter.  This
  4176.     config will provide SCSI-1 performance.
  4177.  
  4178. C.  A mix of SCSI-2 and SCSI-1 devices are supported on a SCSI-1
  4179.     adapter.  All devices will have SCSI-1 performance.
  4180.  
  4181. D.  A mix of SCSI-2 and SCSI-1 devices are supported on a SCSI-2
  4182.     adapter.  SCSI-2 devices will have SCSI-2 performance (10 MB/sec)
  4183.     and SCSI-1 devices will have SCSI-1 performance (4-5 MB/sec).
  4184.  
  4185.  
  4186. 1.901: How to get your keyboard back after unplugging it from the 6000
  4187. From: Mickey Coggins and Anne Serre
  4188.  
  4189. When you unplug your keyboard from a running system, and plug it back
  4190. in, the key mapping is wrong.  For example, keys like Caps Lock and Ctrl
  4191. don't work as designed.
  4192.  
  4193. Solution: Type at the command line
  4194.  
  4195.         /usr/lpp/diagnostics/da/dkbd
  4196.  
  4197. Your screen goes black, you hear a few beeps, and your keyboard is reset.
  4198. It works with any environment, Xwindows, hft, NLS...
  4199.  
  4200. For Models 220, 230 and M20, use the following commands:
  4201.  
  4202. /usr/lpp/diagnostics/da/dkbd
  4203. /usr/lpp/diagnostics/da/dkbdsal   (for the 220)
  4204.  
  4205.  
  4206. 1.902: How do I set up pcsim, the DOS emulator?
  4207.  
  4208. You must have a bootable DOS diskette to install pcsim. Either DOS 3.3, 
  4209. 4.x, or 5.0 will work. IBM do not officially support DOS 5.0 for pcsim
  4210. but I have no problems with it. Just don't try to be fancy with the UMB 
  4211. and memory manager stuff.
  4212.  
  4213. With a bootable DOS disk in the drive, do:
  4214. $touch /u/dosdrive (this is the AIX file for DOS emulation)
  4215. $pcsim -Adiskette 3 -Cdrive /u/dosdrive
  4216. You would now get an A prompt. Type:
  4217. A> fdisk
  4218. Create the virtual C drive of whatever size you choose. Make it large 
  4219. enough for your needs since you cannot enlarge it later.
  4220. A> format c: /s (to format the virtual C drive)
  4221. Now exit from pcsim with ESCpcsim (Esc key followed by pcsim).
  4222.  
  4223. Now create a simprof file. Following is a starter:
  4224.  
  4225. Adiskette   : 3
  4226. Cdrive      :/u/dosdrive
  4227. lpt1        : name of printer queue
  4228. refresh     : 50
  4229. dmode       : V
  4230. mouse       : com1
  4231.  
  4232. You can now start pcsim anytime by typing pcsim. Make sure no floppies
  4233. are in the drive. For further information, refer to publication
  4234. SC23-2452, Personal Computer Simulator/6000 Guide and Reference.
  4235.        
  4236.  
  4237. 1.903: How do I transfer files between AIX and DOS disks?
  4238.  
  4239. In one of the bos extensions are commands for transferring files between
  4240. DOS diskettes and AIX. The commands are dosread, doswrite, dosdir, dosdel,
  4241. and dosformat. Many users have mentioned that the mtools package from
  4242. prep.ai.mit.edu is better than the native AIX programs.
  4243.  
  4244.  
  4245. 1.904: Where is the crypt program?
  4246.  
  4247. You can use PGP or crypt depending on your needs both require that you 
  4248. are a United States citizen and you reside in the United States.
  4249. Crypt is availible from your IBM marketing branch office.
  4250.  
  4251. The United States government classifies encryption technology as a
  4252. munition, meaning that you need an arms license to sell it overseas or
  4253. to non-US nationals.
  4254.  
  4255.  
  4256. 1.905: How do I play audio CDs?
  4257. From: woan@austin.ibm.com (Ronald S. Woan)
  4258.  
  4259. Get xmcd by anonymous FTP from ftp.x.org in /contrib/applications/xmcd/
  4260.  
  4261.  
  4262. _____________________________________________________________________________
  4263. 2.00: C/C++
  4264.  
  4265. Contrary to many people's belief, the C environment on the RS/6000 is
  4266. not very special.  The C compiler has quite a number of options that can
  4267. be used to control how it works, which "dialect" of C it compiles, how
  4268. it interprets certain language constructs, etc.  InfoExplorer includes a
  4269. Users Guide and a Reference Manual.
  4270.  
  4271. The compiler can be invoked with either xlc for strict ANSI mode and cc
  4272. for RT compatible mode (i.e. IBM 6150 with AIX 2).  The default options
  4273. for each mode are set in the /etc/xlc.cfg file, and you can actually add
  4274. another stanza and create a link to the /bin/xlc executable.
  4275.  
  4276. The file /usr/lpp/xlc/bin/README.xlc has information about the C
  4277. compiler, and the file /usr/lpp/bos/bsdport contains useful information,
  4278. in particular for users from a BSD background.
  4279.  
  4280. The file /etc/xlc.cfg also shows the symbol _IBMR2 that is predefined,
  4281. and therefore can be used for #ifdef'ing RS/6000 specific code.
  4282.  
  4283.  
  4284. 2.01: I cannot make alloca work
  4285.  
  4286. A famous routine, in particular in GNU context, is the allocation
  4287. routine alloca().  Alloca allocates memory in such a way that it is
  4288. automatically free'd when the block is exited.  Most implementations
  4289. does this by adjusting the stack pointer.  Since not all C environments
  4290. can support it, its use is discouraged, but it is included in the xlc
  4291. compiler.  In order to make the compiler aware that you intend to use
  4292. alloca, you must put the line
  4293.  
  4294. #pragma alloca
  4295.  
  4296. before any other statements in the C source module(s) where alloca is
  4297. called.  If you don't do this, xlc will not recognize alloca as anything
  4298. special, and you will get errors during linking.
  4299.  
  4300. For AIX 3.2, it may be easier to use the -ma flag.
  4301.  
  4302.  
  4303. 2.02: How do I compile my BSD programs?
  4304.  
  4305. The file /usr/lpp/bos/bsdport contains information on how to port
  4306. programs written for BSD to AIX 3.1.  This file may be very useful for
  4307. others as well.
  4308.  
  4309. A quick cc command for most "standard" BSD programs is:
  4310.   
  4311.   $ cc -D_BSD -D_BSD_INCLUDES  -o [loadfile] [sourcefile.c] -lbsd
  4312.  
  4313. If your software has system calls predefined with no prototype
  4314. parameters, also use the -D_NO_PROTO flag.
  4315.  
  4316.  
  4317. Archive-name: aix-faq/part3
  4318. Last-modified: Feb 13, 1995
  4319. Version: 4.00
  4320.  
  4321.  
  4322. Version: $Id: faq.3,v 1.11 1995/01/13 05:45:02 jwarring Exp jwarring $
  4323.  
  4324. Frequently Asked Questions to AIX 3.x and IBM RS/6000
  4325. _____________________________________________________
  4326.  
  4327. 2.03: Isn't the linker different from what I am used to?
  4328.  
  4329. Yes.  It is not at all like what you are used to:
  4330.  
  4331. - The order of objects and libraries is normally _not_ important.  The
  4332.   linker reads _all_ objects including those from libraries into memory
  4333.   and does the actual linking in one go.  Even if you need to put a
  4334.   library of your own twice on the ld command line on other systems, it
  4335.   is not needed on the RS/6000 - doing so will even make your linking slower.
  4336.  
  4337. - One of the features of the linker is that it will replace an object in
  4338.   an executable with a new version of the same object:
  4339.  
  4340.   $ cc -o prog prog1.o prog2.o prog3.o        # make prog
  4341.   $ cc -c prog2.c                # recompile prog2.c
  4342.   $ cc -o prog.new prog2.o prog            # make prog.new from prog
  4343.                         # by replacing prog2.o
  4344.   
  4345. - The standard C library /lib/libc.a is linked shared, which means that
  4346.   the actual code is not linked into your program, but is loaded only
  4347.   once and linked dynamically during loading of your program.
  4348.  
  4349. - The ld program actually calls the binder in /usr/lib/bind, and you can
  4350.   give ld special options to get details about the invocation of the
  4351.   binder.  These are found on the ld man page or in InfoExplorer.
  4352.  
  4353. - If your program normally links using a number of libraries (.a files),
  4354.   you can 'prelink' each of these into an object, which will make your
  4355.   final linking faster.  E.g. do:
  4356.  
  4357.   $ cc -c prog1.c prog2.c prog3.c
  4358.   $ ar cv libprog.a prog1.o prog2.o prog3.o
  4359.   $ ld -r -o libprog.o libprog.a
  4360.   $ cc -o someprog someprog.c libprog.o
  4361.  
  4362. This will solve all internal references between prog1.o, prog2.o and
  4363. prog3.o and save this in libprog.o Then using libprog.o to link your
  4364. program instead of libprog.a will increase linking speed, and even if
  4365. someprog.c only uses, say prog1.o and prog2.o, only those two modules
  4366. will be in your final program.  This is also due to the fact that the
  4367. binder can handle single objects inside one object module as noted above.
  4368.  
  4369. If you are using an -lprog option (for libprog.a) above, and still want
  4370. to be able to do so, you should name the prelinked object with a
  4371. standard library name, e.g. libprogP.a (P identifying a prelinked
  4372. object), that can be specified by -lprogP.  You cannot use the archiver
  4373. (ar) on such an object.
  4374.  
  4375. You should also have a look at section 3.01 of this article, in
  4376. particular if you have mixed Fortran/C programs.
  4377.  
  4378. Dave Dennerline (d.dennerline@bull.com) claims that his experiences
  4379. in prelinking on AIX does not save much time since most people have
  4380. separate libraries which do not have many dependencies between them,
  4381. thus not many symbols to resolve.
  4382.  
  4383.  
  4384. 2.04: How do I link my program with a non-shared /lib/libc.a?
  4385.  
  4386.   cc -o prog -bnoso -bI:/lib/syscalls.exp obj1.o obj2.o obj3.o
  4387.  
  4388. will do that for a program consisting of the three objects obj1.o, etc.
  4389.  
  4390. From: Marc Pawliger (marc@sti.com)
  4391.  
  4392. As of AIX 3.2.5, you can install a speedup for AIXwindows called
  4393. Shared Memory Transport.  To static link an X application after the
  4394. SMT PTF has been installed, you must link with
  4395. -bI:/usr/lpp/X11/bin/smt.exp and the executable will NOT run on a
  4396. machine where SMT is not installed.  See /usr/lpp/X11/README.SMT
  4397.  
  4398. 2.05: How do I make my own shared library?
  4399.  
  4400. To make your own shared object or library of shared objects, you should
  4401. know that a shared object cannot have undefined symbols.  Thus, if your
  4402. code uses any externals from /lib/libc.a, the latter MUST be linked with
  4403. your code to make a shared object.  Mike Heath (mike@pencom.com) said it
  4404. is possible to split code into more than one shared object when externals
  4405. in one object refer to another one.  You must be very good at
  4406. import/export files.  Perhaps he or someone can provide an example. 
  4407.  
  4408. Assume you have one file, sub1.c, containing a routine with no external
  4409. references, and another one, sub2.c, calling stuff in /lib/libc.a.  You
  4410. will also need two export files, sub1.exp, sub2.exp.  Read the example
  4411. below together with the examples on the ld man page. 
  4412.  
  4413. ---- sub1.c ----
  4414.     int addint(int a, int b)
  4415.     {
  4416.       return a + b;
  4417.     }
  4418. ---- sub2.c ----
  4419.     #include <stdio.h>
  4420.  
  4421.     void printint(int a)
  4422.     {
  4423.       printf("The integer is: %d\n", a);
  4424.     }
  4425. ---- sub1.exp ----
  4426.     #!
  4427.     addint
  4428. ---- sub2.exp ----
  4429.     #!
  4430.     printint
  4431. ---- usesub.c ----
  4432.     main()
  4433.     {
  4434.       printint( addint(5,8) );
  4435.     }
  4436.  
  4437. The following commands will build your libshr.a, and compile/link the
  4438. program usesub to use it.  Note that you need the ld option -lc for
  4439. sub2shr.o since it calls printf from /lib/libc.a.
  4440.  
  4441.   $ cc  -c sub1.c
  4442.   $ ld -o sub1shr.o sub1.o -bE:sub1.exp -bM:SRE -T512 -H512 
  4443.   $ cc  -c sub2.c
  4444.   $ ld -o sub2shr.o sub2.o -bE:sub2.exp -bM:SRE -T512 -H512  -lc
  4445.   $ ar r libshr.a sub1shr.o sub2shr.o
  4446.   $ cc -o usesub usesub.c -L: libshr.a
  4447.   $ usesub
  4448.   The integer is: 13
  4449.   $
  4450.  
  4451.  
  4452. 2.06: Linking my program fails with strange errors.  Why?
  4453.  
  4454. Very simple, the linker (actually called the binder), cannot get the
  4455. memory it needs, either because your ulimits are too low or because you
  4456. don't have sufficient paging space.  Since the linker is quite different
  4457. >from normal Unix linkers and actually does much more than these, it also
  4458. uses a lot of virtual memory.  It is not unusual to need 10000 pages (of
  4459. 4k) or more to execute a fairly complex linking.
  4460.  
  4461. If you get 'BUMP error', either ulimits or paging is too low, if you get
  4462. 'Binder killed by signal 9' your paging is too low.
  4463.  
  4464. First, check your memory and data ulimits; in korn shell 'ulimit -a' will
  4465. show all limits and 'ulimit -m 99999' and 'ulimit -d 99999' will
  4466. increase the maximum memory and data respectively to some high values. 
  4467. If this was not your problem, you don't have enough paging space.
  4468.  
  4469. If you will or can not increase your paging space, you could try this:
  4470.  
  4471. - Do you duplicate libraries on the ld command line? That is never
  4472.   necessary.
  4473.  
  4474. - Do more users link simultaneously? Try having only one linking going
  4475.   on at any time.
  4476.  
  4477. - Do a partwise linking, i.e. you link some objects/libraries with the
  4478.   -r option to allow the temporary output to have unresolved references,
  4479.   then link with the rest of your objects/libraries.  This can be split
  4480.   up as much as you want, and will make each step use less virtual memory.
  4481.  
  4482.   If you follow this scheme, only adding one object or archive at a
  4483.   time, you will actually emulate the behavior of other Unix linkers.
  4484.  
  4485. If you decide to add more paging space, you should consider adding a new
  4486. paging space on a second hard disk, as opposed to just increasing the
  4487. existing one.  Doing the latter could make you run out of free space on
  4488. your first harddisk. It is more involved to shrink a paging space
  4489. but easier to delete one.
  4490.  
  4491.  
  4492. 2.07: What's with malloc()?
  4493.  
  4494. malloc() uses a late allocation algorithm based on 4.3 BSD's malloc()
  4495. for speed.  This lets you allocate very large sparse memory spaces,
  4496. since the pages are not actually allocated until they are touched for
  4497. the first time.  Unfortunately, it doesn't die gracefully in the face of
  4498. loss of available memory.  See the "Paging Space Overview" under
  4499. InfoExplorer, and see the notes on the linker in this document for an
  4500. example of an ungraceful death.
  4501.  
  4502. If you want your program to get notified when running out of memory, you
  4503. should handle the SIGDANGER signal.  The default is to ignore it. 
  4504. SIGDANGER is sent to all processes when paging space gets low, and if
  4505. paging space gets even lower, processes with the highest paging space
  4506. usage are sent the SIGKILL signal.
  4507.  
  4508. malloc() is substantially different in 3.2, allocating memory more
  4509. tightly.  If you have problems running re-compiled programs on 3.2,
  4510. try running them with MALLOCTYPE=3.1.
  4511.  
  4512. Early Page Space Allocation (EPSA) added to AIX 3.2: see
  4513. /usr/lpp/bos/README.PSALLOC - IX38211 / U422496 Allows setting of
  4514. early allocation (vs. default late allocation) on a per-process basis.
  4515.  
  4516. 2.08: Why does xlc complain about 'extern char *strcpy()'
  4517.  
  4518. The header <string.h> has a strcpy macro that expands strcpy(x,y) to
  4519. __strcpy(x,y), and the latter is then used by the compiler to generate
  4520. inline code for strcpy.  Because of the macro, your extern declaration
  4521. contains an invalid macro expansion.  The real cure is to remove your
  4522. extern declaration but adding -U__STR__ to your xlc will also do the trick.
  4523.  
  4524.  
  4525. 2.09: Why do I get 'Parameter list cannot contain fewer ....'
  4526.  
  4527. This is the same as above.
  4528.  
  4529.  
  4530. 2.10: Why does xlc complain about '(sometype *)somepointer = something'
  4531.  
  4532. Software that is developed using gcc may have this construct. However,
  4533. standard C does not permit casts to be lvalues, so you will need to
  4534. change the cast and move it to the right side of the assignment. If you
  4535. compile with 'cc', removing the cast completely will give you a warning,
  4536. 'xlc' will give you an error (provided somepointer and something are of
  4537. different types - but else, why would the cast be there in the first place?)
  4538.  
  4539.  
  4540. 2.11: Some more common errors
  4541.  
  4542. Here are a few other common errors with xlc:
  4543.  
  4544. 305 |     switch((((np)->navigation_type) ? (*((np)->navigation_type)) :
  4545.       ((void *)0)))
  4546.       .a...........  
  4547. a - 1506-226: (S) The second and third operands of the conditional
  4548. operator must be of the same type.
  4549.  
  4550. The reason for this is that xlc defines NULL as (void *)0, and it does
  4551. not allow two different types as the second and third operand of ?:. 
  4552. The second argument above is not a pointer and the code used NULL
  4553. incorrectly as a scalar. NULL is a nil pointer constant in ANSI C and
  4554. in some traditional compilers.
  4555.  
  4556. You should change NULL in the third argument above to an integer 0.
  4557.  
  4558.  
  4559. 2.12: Can the compiler generate assembler code?
  4560.  
  4561. Starting with version 1.3 of xlc and xlf the -S option will generate a
  4562. .s assembly code file prior to optimization. The option -qlist will
  4563. generate a human readable one in a .lst file.
  4564.  
  4565. There is also a disassembler in /usr/lpp/xlc/bin/dis include with the
  4566. 1.3 version of xlc (and in /usr/lpp/xlC/bin/dis with the 2.1 version
  4567. of xlC) that will disassemble existing object or executable files.
  4568.  
  4569.  
  4570. 2.13: Curses
  4571.  
  4572. Curses based applications should be linked with -lcurses and _not_ with
  4573. -ltermlib. It has also been reported that some problems with curses are
  4574. avoided if your application is compiled with -DNLS.
  4575.  
  4576. Peter Jeffe <peter@ski.austin.ibm.com> also notes:
  4577.  
  4578. >the escape sequences for cursor and function keys are *sometimes*
  4579. >treated as several characters: eg. the getch() - call does not return
  4580. >KEY_UP but 'ESC [ C.'
  4581.  
  4582. You're correct in your analysis: this has to do with the timing of the
  4583. escape sequence as it arrives from the net. There is an environment
  4584. variable called ESCDELAY that can change the fudge factor used to decide
  4585. when an escape is just an escape. The default value is 500; boosting
  4586. this a bit should solve your problems.
  4587.  
  4588. Christopher Carlyle O'Callaghan <asdfjkl@wam.umd.edu> has more comments
  4589. concerning extended curses:
  4590.  
  4591. 1) The sample program in User Interface Programming Concepts, page 7-13
  4592.    is WRONG. Here is the correct use of panes and panels.
  4593.  
  4594. #include <cur01.h>
  4595. #include <cur05.h>
  4596.  
  4597. main()
  4598. {
  4599. PANE *A, *B, *C, *D, *E, *F, *G, *H;
  4600. PANEL *P;
  4601.  
  4602. initscr();
  4603.  
  4604. A = ecbpns (24, 79, NULL, NULL, 0, 2500, Pdivszp, Pbordry, NULL, NULL);
  4605. D = ecbpns (24, 79, NULL, NULL, 0, 0,    Pdivszf, Pbordry, NULL, NULL);
  4606. E = ecbpns (24, 79, D,    NULL, 0, 0,    Pdivszf, Pbordry, NULL, NULL);
  4607. B = ecbpns (24, 79, A, D, Pdivtyh, 3000, Pdivszp, Pbordry, NULL, NULL);
  4608. F = ecbpns (24, 79, NULL, NULL, 0, 0,    Pdivszf, Pbordry, NULL, NULL);
  4609. G = ecbpns (24, 79, F,    NULL, 0, 5000, Pdivszp, Pbordry, NULL, NULL);
  4610. H = ecbpns (24, 79, G,    NULL, 0, 3000, Pdivszp, Pbordry, NULL, NULL);
  4611. C = ecbpns (24, 79, B, F, Pdivtyh, 0, Pdivszf, Pbordry, NULL, NULL);
  4612. P = ecbpls (24, 79, 0, 0, "MAIN PANEL", Pdivtyv, Pbordry, A);
  4613.  
  4614. ecdvpl (P);
  4615. ecdfpl (P, FALSE);
  4616. ecshpl (P); 
  4617. ecrfpl (P);
  4618. endwin();
  4619. }
  4620.  
  4621. 2) DO NOT include <curses.h> and any other <cur0x.h> file together.
  4622.    You will get a bunch of redefined statements.
  4623.  
  4624. 3) There is CURSES and EXTENDED CURSES. Use only one or the other. If the
  4625.    manual says that they're backwards compatible or some other indication 
  4626.    that you can use CURSES routines with EXTENDED, don't believe it. To 
  4627.    use CURSES you need to include <curses.h> and you can't (see above).
  4628.  
  4629. 4) If you use -lcur and -lcurses in the same link command, you will get
  4630.    Memory fault (core dump) error. You CANNOT use both of them at the same
  4631.    time. -lcur is for extended curses, -lcurses is for regular curses.
  4632.  
  4633. 5) When creating PANEs, when you supply a value (other than 0) for the
  4634.    'ds' parameter and use Pdivszf value for the 'du' parameter, the 'ds'
  4635.    will be ignored (the sample program on page 7-13 in User Interface
  4636.    Programming Concepts is wrong.) For reasons as yet undetermined,
  4637.    Pdivszc doesn't seem to work (or at least I can't figure out how to
  4638.    use it.)
  4639.  
  4640. 6) If you're running into bugs and can't figure out what is happening,
  4641.    try the following:
  4642.    include -qextchk -g in your compile line
  4643.     -qextchk will check to make sure you're passing the right number of
  4644.        parameters to the functions
  4645.     -g enables debug
  4646.  
  4647. 7) Do not use 80 as the number of columns if you want to use the whole
  4648.    screen. The lower right corner will get erased.  Use 79 instead.
  4649.  
  4650. 8) If you create a panel, you must create at least 1 pane, otherwise you
  4651.    will get a Memory fault (core dump).
  4652.  
  4653. 9) When creating a panel, if you don't have a border around it, any title
  4654.    you want will not show up.
  4655.  
  4656. 10) to make the screen scroll down:
  4657.     wmove (win, 0, 0);
  4658.     winsertln (win)
  4659.  
  4660. 11) delwin(win) doesn't work in EXTENDED WINDOWS
  4661.  
  4662.     To make it appear as if a window is deleted, you need to do the following:
  4663.     for every window that you want to appear on the screen
  4664.     touchwin(win)
  4665.     wrefresh(win)
  4666.  
  4667.     you must make sure that you do it in the exact same order as you put
  4668.     them on the screen (i.e., if you called newwin with A, then C, then B,
  4669.     then you must do the loop with A, then C, then B, otherwise you won't
  4670.     get the same screen back).  The best thing to do is to put them into
  4671.     an array and keep track of the last window index.
  4672.  
  4673. 12) mvwin(win, line, col) implies that it is only used for viewports and
  4674.     subwindows. It can also be used for the actual windows themselves.
  4675.  
  4676. 13) If you specify the attribute of a window using wcolorout(win), any
  4677.     subsequent calls to chgat(numchars, mode) or any of its relatives
  4678.     will not work. (or at least they get very picky.)
  4679.  
  4680.  
  4681. 2.14: How do I speed up linking
  4682.  
  4683. Please refer to sections 2.03 and 2.06 above.
  4684.  
  4685. From: losecco@undpdk.hep.nd.edu (John LoSecco) and
  4686.       hook@chaco.aix.dfw.ibm.com (Gary R. Hook)
  4687.  
  4688. >From oahu.cern.ch in /pub/aix3 you can get a wrapper for the existing
  4689. linker called tld which can reduce link times with large libraries by
  4690. factors of 3 to 4.
  4691.  
  4692.  
  4693. 2.15: What is deadbeef?
  4694.  
  4695. When running the debugger (dbx), you may have wondered what the
  4696. 'deadbeef' is you occasionally see in registers.  Do note, that
  4697. 0xdeadbeef is a hexadecimal number that also happens to be some kind
  4698. of word (the RS/6000 was built in Texas!), and this hexadecimal number
  4699. is simply put into unused registers at some time, probably during
  4700. program startup.
  4701.  
  4702.  
  4703. 2.16: How do I statically link in 3.2?
  4704.  
  4705. xlc -bnso -bI:/lib/syscalls.exp -liconv -bnodelcsect 
  4706.  
  4707.  
  4708. 2.17: How do I make an export list from a library archive?
  4709. From: d.dennerline@bull.com (Dave Dennerline)
  4710.  
  4711. This script will only extract the "export"able names and should be
  4712. useful in starting the shared library creation process. The user must
  4713. determine which names should be included in the import and export lists.
  4714. It's only been tested on a few library archives.
  4715.  
  4716. #!/bin/ksh
  4717. #
  4718. # mkexps - make export list
  4719. # This program creates an export list by combining all the "." and normal names
  4720. # into one list. 
  4721. #
  4722. if [[ "$#" -ne 1 ]]
  4723. then
  4724.     print "Usage: mkexps ArchiveFile"
  4725.     exit -2
  4726. fi
  4727. if [[ ! -f $1 ]] 
  4728. then
  4729.     print "mkexps: Cannot open file \"$1\""
  4730.     exit -1
  4731. fi
  4732. dump -g $1 | awk '
  4733. BEGIN {
  4734.         top = 1
  4735. }    
  4736. /^[ ]*[0-9][0-9]*/ {
  4737.     if ( (n = index( $2, "." )) > 0 ) {
  4738.         export_array[ top++ ] = substr( $2, n+1, length( $2 ))
  4739.     }
  4740.     else {
  4741.     export_array[ top++ ] = $2
  4742.     }
  4743. }
  4744.  
  4745. END {
  4746.     for ( i = 1; i < top; i++ )
  4747.     {
  4748.     print export_array[ i ]
  4749.     }
  4750.  
  4751. }' | sort | uniq
  4752.  
  4753.  
  4754. 2.18 Building imake, makedepend
  4755. From: crow@austin.ibm.com (David L. Crow)
  4756.  
  4757.     You need X11dev.src release 1.2.3.0 (ie the R5 release).  
  4758.      Unless you have an R5 release of AIXwindows, there is no xmkmf.
  4759.   These are the steps that I use to make imake, makedepend and all
  4760.   of it's config files, and then install them in the working tree
  4761.   (ie not the Xamples) for daily use:
  4762.   
  4763.       cd /usr/lpp/X11/Xamples
  4764.       make Makefile
  4765.       make SUBDIRS="config util" Makefiles
  4766.       make SUBDIRS="config util" linklibs
  4767.       make SUBDIRS="config util" depend
  4768.       make SUBDIRS="config util" 
  4769.       make SUBDIRS="config util" install
  4770.       
  4771.   Then redo the steps everytime you apply an X11 update.
  4772.  
  4773.  
  4774. 2.19: How can tell what shared libraries a binary is linked with?
  4775.  
  4776. Use "dump -H <execfilename>" and see if anything other than /unix is
  4777. listed in the loader section (at the bottom).  The first example is
  4778. /bin/sh (statically linked) and the second example is
  4779. /usr/local/bin/bash (shared).
  4780.  
  4781. INDEX  PATH                          BASE                MEMBER              
  4782. 0      /usr/lib:/lib                                                         
  4783. 1      /                             unix                                    
  4784.  
  4785. INDEX  PATH                          BASE                MEMBER              
  4786. 0      ./lib/readline/:./lib/glob/:/usr/lib:/lib               
  4787. 1                                    libc.a              shr.o               
  4788. 2                                    libcurses.a         shr.o               
  4789.  
  4790.  
  4791. 2.20: Can I get a PTF for my C/C++ compiler from the net?
  4792.  
  4793. Unfortunately, the compiler group does not release PTFs.  You have to
  4794. call IBM and ask for the latest tape.
  4795.  
  4796. _____________________________________________________
  4797. 3.00: Fortran and other compilers
  4798.  
  4799. This section covers all compilers other than C/C++.  On Fortran, there
  4800. seem to have been some problems with floating point handling, in
  4801. particular floating exceptions.
  4802.  
  4803.  
  4804. 3.01: I have problems mixing Fortran and C code, why?
  4805.  
  4806. A few routines (such as getenv, signal, and system) exist in both the
  4807. Fortran and C libraries but with different parameters. In the recent
  4808. past, if you have a mixed program that calls getenv from both C and
  4809. Fortran code, you have to link them carefully by specifying the correct
  4810. library first on your command line. This is no longer needed starting
  4811. with version 1.5 of the compilers.
  4812.  
  4813.  
  4814. 3.02: How do I statically bind Fortran libraries and dynamically
  4815.       bind C libraries?
  4816. From: amaranth@vela.acs.oakland.edu (Paul Amaranth)
  4817.  
  4818. [ Editor's note: Part of this is also discussed above under the C compiler
  4819.   section, but I felt it was so valuable that I have left it all in. 
  4820.   I've done some minor editing, mostly typographical. ]
  4821.  
  4822. The linker and binder are rather versatile programs, but it is not
  4823. always clear how to make them do what you want them to.  In particular,
  4824. there are times when you do not want to use shared libraries, but
  4825. rather, staticly bind the required routines into your object.  Or, you
  4826. may need to use two versions of the same routine (eg, Fortran & C).  Here
  4827. are the results of my recent experiments.  I would like to thank Daniel
  4828. Premer and Brad Hollowbush, my SE, for hints.  Any mistakes or omissions
  4829. are my own and I have tended to interchange the terms "linker" and
  4830. "binder".  These experiments were performed on AIX 3.1.2.  Most of this
  4831. should be applicable to later upgrades of 3.1.
  4832.  
  4833. 1)  I have some C programs, I want to bind in the runtime routines.  How
  4834.     do I do this? [Mentioned in section 2.04 of this article as well, ed.]
  4835.  
  4836.     You can put the -bnso binder command on the link line.  You should
  4837.     also include the -bI:/lib/syscalls.exp control argument:
  4838.       
  4839.       $ cc *.o -bnso -bI:/lib/syscalls.exp -o foo
  4840.  
  4841.     This will magically do everything you need.  Note that this will bind
  4842.     _all_ required routines in.  The -bI argument tells the linker that
  4843.     these entry points will be resolved dynamically at runtime (these are
  4844.     system calls).  If you omit this you will get lots of unresolved 
  4845.     reference messages.
  4846.  
  4847. 2)  I want to statically bind in the Fortran runtime so a) my customers 
  4848.     do not need to buy it and b) I don't have to worry about the runtime
  4849.     changing on a new release.  Can I use the two binder arguments in
  4850.     1) to do this?
  4851.  
  4852.     You should be able to do so, but, at least under 3002, if you do
  4853.     you will get a linker error referencing getenv.  In addition, there
  4854.     are a number of potential conflicts between Fortran and C routines.
  4855.     The easy way just does not work.  See the section on
  4856.     2 stage linking for C and Fortran on how to do this.  The getenv
  4857.     problem is a mess, see the section on Comments & Caveats for more.
  4858.  
  4859. 3)  I have a mixture of C and Fortran routines, how can I make sure
  4860.     that the C routines reference the C getenv, while the Fortran routines
  4861.     reference the Fortran getenv (which has different parameters and, if
  4862.     called mistakenly by a C routine results in a segmentation fault)?
  4863.  
  4864.     From Mike Heath (mike@pencom.com):
  4865.  
  4866.     Use -brename:symbol1,symbol2 when pre-linking the modules from one
  4867.     of the languages. It does not matter which one you choose.
  4868.  
  4869. 4)  I have C and Fortran routines.  I want to bind in the xlf library, while
  4870.     letting the rest of the libraries be shared.  How do I do this?
  4871.  
  4872.     You need to do a 2 stage link.  In the first stage, you bind in the
  4873.     xlf library routines, creating an intermediate object file.  The
  4874.     second stage resolves the remaining references to the shared libraries.
  4875.  
  4876.     This is a general technique that allows you to bind in specific system
  4877.     routines, while still referencing the standard shared libraries.
  4878.  
  4879.     Specifically, use this command to bind the xlf libraries to the Fortran
  4880.     objects:
  4881.  
  4882.        $ ld -bh:4 -T512 -H512 <your objects> -o intermediat.o \
  4883.          -bnso -bI:/lib/syscalls.exp -berok -lxlf -bexport:/usr/lib/libg.exp \
  4884.          -lg -bexport:<your export file>
  4885.  
  4886.     The argument -bexport:<your export file> specifies a file with the
  4887.     name of all entry points that are to be visible outside the intermediate 
  4888.     module.  Put one entrypoint name on a line.  The -bI:/lib/libg.exp line 
  4889.     is required for proper functioning of the program.  The -berok argument 
  4890.     tells the binder that it is ok to have unresolved references, at least 
  4891.     at this time (you would think -r would work here, but it doesn't seem to).  
  4892.     The -bnso argument causes the required modules to be imported
  4893.     into the object.  The -lxlf, of course, is the xlf library.
  4894.  
  4895.     Then, bind the intermediate object with the other shared libraries in
  4896.     the normal fashion:
  4897.  
  4898.        $ ld -bh:4 -T512 -H512 <C or other modules> intermediate.o \
  4899.          /lib/crt0.o -lm -lc
  4900.  
  4901.     Note the absence of -berok.  After this link, all references should
  4902.     be resolved (unless you're doing a multistage link and making another
  4903.     intermediate).
  4904.  
  4905.     NOTE THE ORDER OF MODULES.  This is extremely important if, for example,
  4906.     you had a subroutine named "load" in your Fortran stuff.  Putting the
  4907.     C libraries before the intermediate module would make the C "load"
  4908.     the operable definition, rather than the Fortran version EVEN THOUGH 
  4909.     THE FORTRAN MODULE HAS ALREADY BEEN THROUGH A LINK AND ALL REFERENCES 
  4910.     TO THE SYMBOL ARE CONTAINED IN THE FORTRAN MODULE.  This can
  4911.     be extremely difficult to find (trust me on this one :-)  Is this
  4912.     a bug, a feature, or what?
  4913.     
  4914.     [As mentioned in section 2.03 of this article, it is a feature that you
  4915.     can replace individual objects in linked files, ed.]
  4916.  
  4917.     The result will be a slightly larger object than normal.  (I say slightly
  4918.     because mine went up 5%, but then it's a 2 MB object :-)
  4919.  
  4920.  
  4921. Comments & Caveats:
  4922.  
  4923.    From the documentation the -r argument to the linker should do what
  4924.    -berok does.  It does not.  Very strange results come from using the
  4925.    -r argument.  I have not been able to make -r work in a sensible manner
  4926.    (even for intermediate links which is what it is supposed to be for).
  4927.  
  4928.        Note from Mike Heath (mike@pencom.com):
  4929.  
  4930.        'ld -r' is essentially shorthand for 'ld -berok -bnogc -bnoglink'.
  4931.        Certainly, using -berok with an export file (so garbage collection
  4932.        can be done) is preferable to ld -r, but the latter is easier.
  4933.  
  4934.    When binding an intermediate module, use an export file to define the
  4935.    entry points you want visible in the later link.  If you don't do this,
  4936.    you'll get the dreaded "unresolved reference" error.  Import files name
  4937.    entry points that will be dynamically resolved (and possibly where).
  4938.  
  4939.    If you are in doubt about what parameters or libraries to link, use the
  4940.    -v arg when linking and modify the exec call that shows up into 
  4941.    an ld command.  Some thought about the libraries will usually yield an
  4942.    idea of when to use what.  If you don't know what an argument is for,
  4943.    leave it in.  It's there for a purpose (even if you don't understand it).
  4944.  
  4945.    Watch the order of external definitions (ie, libraries) when more than
  4946.    one version of a routine may show up, eg "load".  The first one defined
  4947.    on the ld command line is the winner.  
  4948.  
  4949.    The getenv (and system and signal) problem is a problem that started out
  4950.    minor, got somewhat worse in 3003 and, eventually will be correctly fixed.
  4951.    Basically, you should extract the 3002 version of these three routines
  4952.    from xlf.a before doing the update and save them away, then link these
  4953.    routines in if you use these Fortran system services.  
  4954.  
  4955.  
  4956. 3.03: How do I check if a number is NaN?
  4957. From: sdl@glasnost.austin.ibm.com (Stephen Linam)
  4958.  
  4959. NaN is "Not a Number".  It arises because the RISC System/6000 uses
  4960. IEEE floating point arithmetic.
  4961.  
  4962. To determine if a variable is a NaN you can make use of the property
  4963. that a NaN does not compare equal to anything, including itself.
  4964. Thus, for real variable X, use
  4965.  
  4966.     IF (X .NE. X) THEN    ! this will be true if X is NaN
  4967.  
  4968. Floating point operations which cause exceptions (such as an overflow)
  4969. cause status bits to be set in the Floating Point Status and Control
  4970. Register (FPSCR).  There is a Fortran interface to query the FPSCR, and
  4971. it is described in the XLF Fortran manuals -- I don't have the manuals
  4972. right here, but look for FPGETS and FPSETS.
  4973.  
  4974. The IBM manual "Risc System/6000 Hardware Technical Reference - General
  4975. Information" (SA23-2643) describes what floating point exceptions can
  4976. occur and which bits are set in the FPSCR as a result of those exceptions.
  4977.  
  4978.  
  4979. 3.04: Some info sources on IEEE floating point
  4980.  
  4981. 1. ANSI/IEEE STD 754-1985 (IEEE Standard for Binary Floating-Point
  4982.    Arithmetic) and ANSI/IEEE STD 854-1987 (IEEE Standard for
  4983.    Radix-Independent Floating-Point Arithmetic), both available from IEEE. 
  4984.  
  4985. 2. David Goldberg, "What Every Computer Scientist Should Know About
  4986.    Floating-Point Arithmetic", ACM Computing Surveys, Vol. 23, No. 1,
  4987.    March 1991, pp. 5-48.
  4988.  
  4989. ____________________________________________________________________________
  4990. 4.00: GNU and Public Domain software
  4991.  
  4992. GNU software comes from the Free Software Foundation and various other
  4993. sources. A number of ftp sites archive them. Read the GNU license for 
  4994. rules on distributing their software.
  4995.  
  4996. Lots of useful public domain software have been and continue to be ported
  4997. to the RS/6000. See below for ftp or download information.
  4998.  
  4999.  
  5000. 4.01: How do I find sources?
  5001. From: jik@GZA.COM (Jonathan Kamens)
  5002.  
  5003. There is a newsgroup devoted to posting about how to get a certain
  5004. source.  One is strongly urged to follow the guidelines in the article
  5005. How_to_find_sources(READ_THIS_BEFORE_POSTING), available via anonymous
  5006. ftp from rtfm.mit.edu
  5007.  
  5008. /pub/usenet/comp.sources.wanted/H_t_f_s_(R_T_B_P)
  5009.  
  5010. Note: You should try to use hostnames rather than ip addresses since
  5011. they are much less likely to change.
  5012.  
  5013. Also available from mail-server@rtfm.mit.edu by sending a mail
  5014. message containing:
  5015.  
  5016. send usenet/comp.sources.wanted/H_t_f_s_(R_T_B_P)
  5017.  
  5018. Send a message containing "help" to get general information about the
  5019. mail server.
  5020.  
  5021. If you don't find what you were looking for by following these
  5022. guidelines, you can post a message to comp.sources.wanted.
  5023.  
  5024.  
  5025. 4.02: Are there any ftp sites?
  5026.  
  5027. Below are some ftp sites that are supposed to have RS/6000 specific
  5028. software.  I haven't verified all the entries.
  5029.  
  5030. US sites:
  5031. aixpdslib.seas.ucla.edu        128.97.2.211    pub
  5032. acd.ucar.edu                128.117.32.1     pub/AIX         
  5033. acsc.acsc.com               143.127.0.2        pub
  5034. byron.u.washington.edu      128.95.48.32    pub/aix/RS6000 (older stuff)
  5035. lightning.gatech.edu        128.61.10.8        pub/aix
  5036. tesla.ee.cornell.edu        128.84.253.11    pub
  5037.  
  5038. European sites:
  5039. nic.funet.fi                128.214.6.100    pub/unix/AIX/RS6000
  5040. iacrs1.unibe.ch             130.92.11.3        pub
  5041. ftp.zrz.TU-Berlin.DE        130.149.4.50    pub/aix
  5042. ftp-aix.polytechnique.fr    129.104.3.60    pub/binaries/rios
  5043. ftp.uni-stuttgart.de        129.69.8.13         sw/rs_aix32/
  5044.  
  5045. The first one is dedicated to software running on AIX.  It might not
  5046. always be the latest versions of the software, but it has been ported to
  5047. AIX (normally AIX version 3 only).  Once connected, you should retrieve
  5048. the files README and pub/ls-lR.
  5049.  
  5050. Please use the European sites very sparingly.  They are primarily to
  5051. serve people in Europe and most of the software can be found in the US
  5052. sites originally.
  5053.  
  5054. Host ibminet.awdpa.ibm.com
  5055.     Location: pub/announcements   #IBM announcements
  5056.     Location: pub/oemhw           #oem hardware
  5057.     Location: pub/ptfs            #PTFs
  5058.  
  5059. Host cac.toronto.ibm.com
  5060.     Location: marketing-info
  5061.  
  5062. >From David Edelsohn (c1dje@watson.ibm.com):
  5063. Host aixpdslib.seas.ucla.edu
  5064.     Location: ?                   #AIX archive (sources and binaries)
  5065. Host ftp.egr.duke.edu
  5066.     Location: ?                   #AIX archive
  5067. Host straylight.acs.ncsu.edu
  5068.     Location: ?                   #AIX archive
  5069. Host alpha.gnu.ai.mit.edu
  5070.     Location: /rs6000          #AIX archive
  5071. Host ftp.uni-stuttgart.de
  5072.     Location: /sw/rs_aix32
  5073.  
  5074. >From Frank E. Doss (csfed@ux1.cts.eiu.edu):
  5075. Host iacrs2.unibe.ch
  5076.     Location: /pub/aix            #bunch of goodies)
  5077. Host ftp.u.washington.edu
  5078.     Location: /pub/RS6000         #minimal -- ted)
  5079. Host aixive.unb.ca
  5080.     Location: ?                   #just announced -- new archive)
  5081. Host ftp.ans.net
  5082.     Location: /pub/misc           #wais goodies)
  5083. Host uvaarpa.virginia.edu
  5084.     Location: /pub/misc           #minimal -- whois)
  5085. Host ux1.cts.eiu.edu
  5086.     Location: /pub/rs6000         #minimal -- pop3, FAQ, whois)
  5087.  
  5088. >From Robert MacKinnon (robmack@bsc.no):
  5089. Host ftp.bsc.no
  5090.     Location: pub/Src.
  5091.  
  5092. >From Joel Marchand (jma@ariana.polytechnique.fr):
  5093. Host ftp-aix.polytechnique.fr (129.104.3.60)
  5094.     Location: pub/binaries/rios
  5095.  
  5096.  
  5097. Sites with directories named 'aix':
  5098.  
  5099. Host aix1.segi.ulg.ac.be   (139.165.32.13)
  5100.     Location: /pub/aix
  5101.  
  5102. Host byron.u.washington.edu   (128.95.48.32)
  5103.    Location: /pub/aix
  5104.  
  5105. Host cunixf.cc.columbia.edu   (128.59.40.130)
  5106.     Location: /aix
  5107.  
  5108. Host files1zrz.zrz.tu-berlin.de   (130.149.4.50)
  5109.     Location: /pub/aix
  5110.  
  5111. Host ftp.rz.uni-augsburg.de   (137.250.113.20)
  5112.     Location: /pub/aix
  5113.  
  5114. Host fyvie.cs.wisc.edu   (128.105.8.18)
  5115.     Location: /pub/aix
  5116.  
  5117. Host solaria.cc.gatech.edu   (130.207.7.245)
  5118.     Location: /pub/incoming/aix
  5119.     Location: /pub/aix
  5120.  
  5121. Host spot.colorado.edu   (128.138.129.2)
  5122.     Location: /aix
  5123.     Location: /pub/patches/aix
  5124.  
  5125. Host swdsrv.edvz.univie.ac.at   (131.130.1.4)
  5126.     Location: /unix/systems/aix
  5127.  
  5128. Host switek.uni-muenster.de   (128.176.120.210)
  5129.     Location: /pub/aix
  5130.  
  5131. Host wuarchive.wustl.edu   (128.252.135.4)
  5132.     Location: /systems/aix
  5133.  
  5134.  
  5135. Sites with directories named 'AIX':
  5136.  
  5137. Host cs.nyu.edu   (128.122.140.24)
  5138.     Location: /pub/AIX
  5139.  
  5140. Host karazm.math.uh.edu   (129.7.128.1)
  5141.     Location: /pub/AIX
  5142.  
  5143. Host minnie.zdv.uni-mainz.de   (134.93.178.128)
  5144.     Location: /pub0/pub/AIX
  5145.  
  5146. Host oersted.ltf.dth.dk   (129.142.66.16)
  5147.     Location: /pub/AIX
  5148.  
  5149. Host rs3.hrz.th-darmstadt.de   (130.83.55.75)
  5150.     Location: /pub/incoming/AIX
  5151.  
  5152.  
  5153. Sites with directories named 'rs6000':
  5154.  
  5155. Host aeneas.mit.edu   (18.71.0.38)
  5156.     Location: /pub/rs6000
  5157.  
  5158. Host cameron.egr.duke.edu   (128.109.156.10)
  5159.     Location: /rs6000
  5160.  
  5161. Host ifi.informatik.uni-stuttgart.de   (129.69.211.1)
  5162.     Location: /pub/rs6000
  5163.  
  5164. Host metropolis.super.org   (192.31.192.4)
  5165.     Location: /pub/rs6000
  5166.  
  5167. Host ramses.cs.cornell.edu   (128.84.218.75)
  5168.     Location: /pub/rs6000
  5169.  
  5170. Host server.uga.edu   (128.192.1.9)
  5171.     Location: /pub/rs6000
  5172.  
  5173. Host unidata.ucar.edu   (128.117.140.3)
  5174.     Location: /pub/bin/rs6000
  5175.  
  5176. Host uvaarpa.virginia.edu   (128.143.2.7)
  5177.     Location: /pub/rs6000
  5178.  
  5179. Host wayback.cs.cornell.edu   (128.84.254.7)
  5180.     Location: /pub/rs6000
  5181.  
  5182.  
  5183. Sites with directories named 'RS6000':
  5184.  
  5185. Host alice.fmi.uni-passau.de   (132.231.1.180)
  5186.     Location: /pub/RS6000
  5187.  
  5188. Host byron.u.washington.edu   (128.95.48.32)
  5189.     Location: /pub/aix/RS6000
  5190.  
  5191. Host milton.u.washington.edu   (128.95.136.1)
  5192.     Location: /pub/RS6000
  5193.  
  5194. Host pascal.math.yale.edu   (128.36.23.1)
  5195.     Location: /pub/RS6000
  5196.  
  5197. Host uxc.cso.uiuc.edu   (128.174.5.50)
  5198.     Location: /pub/RS6000
  5199.  
  5200.  
  5201. 4.03: General hints
  5202.  
  5203. In general, curses based applications should be linked with -lcurses and
  5204. _not_ with -ltermlib.  It has also been reported that compiling with
  5205. -DNLS helps curses based programs.
  5206.  
  5207. Note that the RS/6000 has two install programs, one with System V flavor
  5208. in the default PATH (/etc/install with links from /usr/bin and /usr/usg),
  5209. and one with BSD behavior in /usr/ucb/install.
  5210.  
  5211. When adding new shells to the system, add them to the "shells=" line
  5212. in /etc/security/login.cfg so they can be used during ftp and rlogin
  5213. by users who use them as their default shell.
  5214.  
  5215.  
  5216. 4.04: GNU Emacs
  5217.  
  5218. If you get a segmentation fault in GNU EMACS 19.* during hilit19 use,
  5219. you can set locale to C (export LC_ALL=C) to get around the AIX bug.
  5220.  
  5221. Version 18.57 of GNU Emacs started to have RS/6000 support.  Use
  5222. s-aix3-2.h for AIX 3.2. Emacs is going through rapid changes recently.
  5223. Current release is 19.x.
  5224.  
  5225. Emacs will core-dump if it is stripped, so don't strip when you install
  5226. it.  You can edit a copy of the Makefile in src replacing all 'install -s' 
  5227. with /usr/ucb/install.
  5228.  
  5229.  
  5230. 4.05: gcc/gdb
  5231.  
  5232. GNU C version 2.0 and later supports the RS/6000, and compiles straight
  5233. out of the box.  You may, however, experience that compiling it requires
  5234. large amounts of paging space.
  5235.  
  5236. Compiling gcc and gdb requires a patch to the 'as' assembler.  Call
  5237. IBM software support and request patch for apar IX26107 (U409205).
  5238.  
  5239. gcc has undergone many changes lately and the current version is 2.5.x.
  5240. gdb is at 4.1x.
  5241.  
  5242. If your machine crashed when trying to run gdb 4.7, call software support
  5243. and request ptf U412815.
  5244.  
  5245.  
  5246. 4.06: GNU Ghostscript 
  5247.  
  5248. The PostScript interpreter GNU Ghostscript Version 2.3 and later supports
  5249. the RS/6000 and can be found on various ftp sites. Current version is 2.6.1.
  5250.  
  5251. Compile time problems:
  5252.   Compile idict.c and zstack.c _without_ optimization, add the following
  5253.   to the Makefile:
  5254.  
  5255.   idict.o: idict.c
  5256.         $(CC) -c idict.c
  5257.  
  5258.   zstack.o: zstack.c
  5259.         $(CC) -c zstack.c
  5260.  
  5261. Run time problems:
  5262.   Running ghostview-1.5 with ghostscript-2.6.1, I get 
  5263.    gs: Malformed ghostview color property.
  5264.   Solution: replace buggy version of ghostscript-2.6.1 X11 driver
  5265.   with at least 2.6.1pl4 
  5266.  
  5267. 4.07  TeX - Document processing
  5268.  
  5269. TeX can be retrieved via ftp from ftp.uni-stuttgart.de.
  5270. Be sure to use a recent C compiler (01.02.0000.0013) and you can compile
  5271. with optimization.
  5272.  
  5273.  
  5274. 4.08  Perl - Scripting language
  5275.  
  5276. Current version is 4.035 and compiling with cc should give no problems. 
  5277. If you use bsdcc, do not use perl's builtin malloc(), edit config.H to
  5278. '#define HAS_SYMLINK', and you should be on your way.  Bill Wohler tells
  5279. me that perl will run without editing config.H and with cc as well.  So
  5280. just say no to use perl's malloc().
  5281.  
  5282. Doug Sewell <DOUG@YSUB.YSU.EDU> adds:
  5283.  
  5284. In addition to not using the perl-provided malloc, when asked if you
  5285. want to edit config.sh, change 'cppstdin' from the wrapper-program
  5286. to '/lib/cpp'.
  5287.  
  5288. The perl wrapper name is compiled into perl, and requires that you keep
  5289. that file in the source directory, even if you blow away the rest of
  5290. the source.  /lib/cpp will do the job by itself.  I suspect this will
  5291. be fixed in perl 4.0pl11 Configure script.
  5292.  
  5293. Also, beware if you have gdbm installed per the instructions in the FAQ.
  5294. Gdbm is compiled with bsdcc; perl (as I installed it, anyway) was built
  5295. with cc, so I used the IBM-provided ndbm routines.
  5296.  
  5297.  
  5298. 4.09: X-Windows
  5299.  
  5300. IBM has two releases of 3.2.3. The base version has X11R4 and Motif 1.1
  5301. and the extended version has X11R5 as AIXwindows 1.2.3.
  5302.  
  5303. AIXwindows version 1.2.0 (X11rte 1.2.0) is X11R4 with Motif 1.1
  5304. AIXwindows version 1.2.3 (X11rte 1.2.3) is X11R5 with Motif 1.1
  5305. X11rte.motif1.2 1.2.3 is Motif 1.2 and requires AIXwindows 1.2.3
  5306.  
  5307.  
  5308. 4.10  Bash - /bin/ksh alternative from FSF
  5309.  
  5310. Bash is an alternative to ksh and is availible from prep.ai.mit.edu
  5311. and places that mirror the GNU software.  /etc/security/login.cfg
  5312. needs to be modified if this will be used as a default shell.
  5313.  
  5314.  
  5315. 4.11: Elm
  5316.  
  5317. A very nice replacement for mail. Elm should be pretty straightforward,
  5318. the only thing to remember is to link with -lcurses as the only
  5319. curses/termlib library. You may also run into the problem listed under
  5320. point 2.13 above.
  5321.  
  5322.  
  5323. 4.12: Oberon 2.2
  5324.  
  5325. From: afx@muc.ibm.de (Andreas Siegert)
  5326.  
  5327. Oberon is Wirth's follow on to Modula-2, but is not compatible. A free
  5328. version of Modula-3 is available from DEC/Olivetti at
  5329. gatekeeper.dec.com. This is not a Modula-2 replacement but a new
  5330. language. There are currently two M2 compilers for the 6000 that I
  5331. know of. One from Edinburgh Portable Compilers, +44 31 225 6262 (UK)
  5332. and the other from Gardens Point is availible through A+L in
  5333. Switzerland (+41 65 520311) or Real Time Associates in the UK
  5334. (info@rtal.demon.co.uk).
  5335.  
  5336. Oberon can be obtained via anonymous ftp from neptune.inf.ethz.ch
  5337. (129.132.101.33) under the directory Oberon/RS6000 or gatekeeper.dec.com
  5338. (16.1.0.2).
  5339.  
  5340.  
  5341. 4.13  Kermit - Communications 
  5342.  
  5343. Get it from watsun.cc.columbia.edu (128.59.39.2), kermit/bin/cku189.tar.Z.
  5344. Uncompress, untar, and "make rs6000", and it works.
  5345.  
  5346.  
  5347. 4.14: Gnu dbm
  5348. From: doug@cc.ysu.edu (Doug Sewell)
  5349.  
  5350. Here's the fixes for RS/6000's:
  5351.  
  5352. apply this to testgdbm.c:
  5353. 158c158
  5354. <   char opt;
  5355. ---
  5356. >   int opt;
  5357. 166c166
  5358. <   while ((opt = getopt (argc, argv, "rn")) != -1)
  5359. ---
  5360. >   while ((opt = getopt (argc, argv, "rn")) != EOF)
  5361.  
  5362. Apply this to systems.h:
  5363. 111a112,114
  5364. > #ifdef RS6000
  5365. > #pragma alloca
  5366. > #else
  5367. 112a116
  5368. > #endif
  5369.  
  5370. To compile, edit the Makefile.  Set CC to bsdcc (see /usr/lpp/bos/bsdport
  5371. if you don't have 'bsdcc' on your system) and set CFLAGS to -DRS6000 and
  5372. whatever options (-g, -O) you prefer.  Don't define SYSV.
  5373.  
  5374.  
  5375. 4.15  tcsh - /bin/ksh alternative
  5376. From: cordes@athos.cs.ua.edu (David Cordes)
  5377.  
  5378. tcsh is available from tesla.ee.cornell.edu (pub/tcsh-6.00 directory)
  5379. Compiles with no problems. You must edit /etc/security/login.cfg to
  5380. permit users to change to this shell (chsh), adding the path where the
  5381. shell is installed (in my case, /usr/local/bin/tcsh).
  5382.  
  5383. From: "A. Bryan Curnutt" <bryan@Stoner.COM>
  5384.  
  5385. Under AIX 3.2.5, you need to modify the "config.h" file, changing
  5386.     #define BSDSIGS
  5387. to
  5388.     #undef BSDSIGS
  5389.  
  5390.  
  5391. 4.16: Kyoto Common Lisp
  5392.  
  5393. The sources are available from cli.com. The kcl package is the needed
  5394. base; also retrieve the latest akcl distribution. akcl provides a
  5395. front-end that "ports" the original kcl to a number of different
  5396. platforms. The port to the 6000 worked with no problems. However, you
  5397. must be root for make to work properly with some memory protection
  5398. routines.
  5399.  
  5400.  
  5401. 4.17  Tcl/Tk - X-Windows scripting
  5402.  
  5403. Current versions: Tcl 7.3, Tk 3.6. Available from sprite.berkeley.edu or
  5404. harbor.ecn.purdue.edu.
  5405.  
  5406.  
  5407. 4.18: Expect
  5408. From: Doug Sewell <DOUG@YSUB.YSU.EDU>
  5409.    
  5410. To build the command-interpreter version, you must have the tcl library
  5411. built successfully. The expect library doesn't require tcl.  Note:
  5412. Expect and its library are built with bsdcc, so applications using
  5413. the library probably also need to be developed with bsdcc.
  5414.  
  5415. I ftp'd expect from ftp.cme.nist.gov.
  5416.  
  5417. You need to change several lines in the makefile.  First you need
  5418. to customize source and target directories and files:
  5419. #
  5420. TCLHDIR = /usr/include
  5421. TCLLIB = -ltcl
  5422. MANDIR = /usr/man/manl               (local man-pages)
  5423. MANEXT = l
  5424. BINDIR = /u/local/bin
  5425. LIBDIR = /usr/lib
  5426. HDIR = /usr/include
  5427. ...
  5428. Next set the compiler, switches, and configuration options:
  5429. #
  5430. CC = bsdcc
  5431. CFLAGS = -O
  5432. ...
  5433. PTY_TYPE = bsd
  5434. ...
  5435. INTERACT_TYPE = select
  5436. ...
  5437. Then you need to make these changes about line 90 or so:
  5438. comment out CFLAGS = $(CLFLAGS)
  5439. un-comment these lines:
  5440. CFLAGS = $(CLFLAGS) $(CPPFLAGS)
  5441. LFLAGS = ($CLFLAGS)
  5442.  
  5443. Then run 'make'.
  5444.  
  5445. You can't run some of the examples without modification (host name,
  5446. etc).  I don't remember if I ran all of them or not, but I ran enough
  5447. that I was satisfied it worked.
  5448.  
  5449.  
  5450. 4.19: Public domain software on CD
  5451. From: mbeckman@mbeckman.mbeckman.com (Mel Beckman)
  5452.  
  5453. The Prime Time Freeware CD collection is a package of two CD's and docs
  5454. containing over THREE GIGABYTES of compressed Unix software. It costs $69
  5455. >from Prime Time Freeware, 415-112 N. Mary Ave., Suite 50, Sunnyvale, CA
  5456. 94086. Phone 408-738-4832 voice, 408-738-2050 fax. No internet orders as
  5457. far as I can tell.
  5458.  
  5459. I've extracted and compiled a number of the packages, and all have worked
  5460. flawlessly so far on my 220. Everything from programming languages to 3D
  5461. solid modeling is in this bonanza!
  5462.  
  5463. Ed: The O'Reilly book, Unix Power Tools, also contains a CD-ROM with lots
  5464. of useful programs compiled for the RS/6000, among other platforms.
  5465.  
  5466.  
  5467. 4.20: Andrew Toolkit
  5468.  
  5469. From: Gary Keim <gk5g+@andrew.cmu.edu>
  5470.  
  5471. The Andrew Toolkit Consortium of Carnegie Mellon University's School of
  5472. Computer Science has released new versions of the Andrew User
  5473. Environment, Andrew Toolkit, and Andrew Message System.
  5474.  
  5475. The Andrew User Environment (AUE) is an integrated set of applications
  5476. beginning with a 'generic object' editor, ez, a help system, a system
  5477. monitoring tool (console), an editor-based shell interface (typescript),
  5478. and support for printing multi-media documents. 
  5479.  
  5480. The Andrew Toolkit (ATK) is a portable user-interface toolkit that runs
  5481. under X11. It provides a dynamically-loadable object-oriented
  5482. environment wherein objects can be embedded in one another. Thus, one
  5483. could edit text that, in addition to containing multiple fonts, contains
  5484. embedded raster images, spreadsheets, drawing editors, equations, simple
  5485. animations, etc. These embedded objects can also be nested.
  5486.  
  5487. The Andrew Message System (AMS) provides a multi-media interface to mail
  5488. and bulletin-boards. AMS supports several mail management strategies
  5489. and implements many advanced features including authentication, return
  5490. receipts, automatic sorting of mail, vote collection and tabulation,
  5491. enclosures, audit trails of related messages, and subscription
  5492. management. It has interfaces that support ttys, personal computers, 
  5493. and workstations.
  5494.  
  5495. Release 5.1 of Andrew contains many bug fixes and updates. There is now
  5496. support for the new Internet MIME (Multipurpose Internet Mail Extensions)
  5497. standards for multipart, and multimedia mail. For more information on
  5498. MIME, please see the CHANGES files in the ftp directory on
  5499. emsworth.andrew.cmu.edu.
  5500.  
  5501. This release can be obtained as follows. The sources are available via
  5502. anonymous ftp from export.lcs.mit.edu (18.30.0.238) in the
  5503. ./contrib/andrew tree. For details, see ./contrib/andrew/README.
  5504.  
  5505. PATCH for AIX3.2: A patch to the AUIS 5.1 sources can be ftp'ed from
  5506. emsworth.andrew.cmu.edu (128.2.45.40) in ./aixpatch. For those without
  5507. internet access, a 3.5" diskette can be ordered for a nominal fee of $10
  5508. by sending, or faxing, a purchase order to the Consortium address below.
  5509.  
  5510. Andrew, as well as a variety of other CMU software, can also be ftp'ed
  5511. >from emsworth.andrew.cmu.edu (128.2.30.62). Those with AFS access look
  5512. at /afs/andrew.cmu.edu/itc/sm/releases/X.V11R5/ftp.
  5513.  
  5514. Remote Andrew Demo Service 
  5515.  
  5516. This network service allows you to run Andrew Toolkit applications
  5517. without obtaining or compiling the Andrew software. You need a host
  5518. machine running X11 on the Internet. A simple "finger" command will let
  5519. you experience ATK applications firsthand. You'll be able to compose
  5520. multimedia documents, navigate through the interactive Andrew Tour, and
  5521. use the Andrew Message System to browse through CMU's three thousand
  5522. bulletin boards and newsgroups.
  5523.  
  5524. To use the Remote Andrew Demo service, run the following command:
  5525.  
  5526.     finger help@atk.itc.cmu.edu 
  5527.  
  5528. The service will give you further instructions.
  5529.  
  5530. Information Sources
  5531.  
  5532. Your bug reports are welcome; kindly send them to
  5533. info-andrew-bugs@andrew.cmu.edu and we will periodically post a status
  5534. report to the mailing list info-andrew@andrew.cmu.edu. To be added to
  5535. the mailing list or make other requests, send mail to
  5536. info-andrew-request@andrew.cmu.edu.
  5537.  
  5538. We also distribute the following related materials:
  5539.  
  5540. ATK and AMS sources and binaries on CDROM. Binaries are available
  5541. for the following system types: 
  5542.  
  5543.             IBM RiscSystem/6000 
  5544.         Sun SparcStation 
  5545.         HP 700 Series 
  5546.         DECstation 
  5547.  
  5548. ATK and AMS sources on QIC and Iotamat tapes Hardcopies of the
  5549. documentation for ATK and AMS. Introductory video tape: Welcome to
  5550. Andrew: An Overview of the Andrew System. Technical video tape: The
  5551. Andrew Project: A Session at the Winter 1988 Usenix Conference.
  5552.  
  5553. More information about these materials is available from:
  5554.  
  5555.     Information Requests
  5556.     Andrew Toolkit Consortium
  5557.     Carnegie Mellon University
  5558.     4910 Forbes Avenue, UCC 214
  5559.     Pittsburgh, PA 15213-3890
  5560.     USA
  5561.     phone: +1-412-268-6710
  5562.     fax: +1-412-621-8081
  5563.     info-andrew-request@andrew.cmu.edu
  5564.  
  5565. There is also a netnews distribution list, comp.soft-sys.andrew, which
  5566. is identical to the info-andrew list except that it does not support the
  5567. multi-media capabilities of info-andrew.
  5568.  
  5569.  
  5570. 4.21: sudo
  5571.  
  5572. The most recent of sudo is cu-sudo v1.3.1 patchlevel 2
  5573. (cu-sudo.v1.3.1pl2.tar.Z).  It support AIX 3.x.  cu-sudo is maintained
  5574. by Todd Miller <millert@cs.colorado.edu>.
  5575.  
  5576.  
  5577. 4.22: Flexfax and other fax software
  5578. From: robmack@bsc.no (Rob MacKinnon)
  5579.  
  5580. sgi.com:/sgi/fax to get FlexFax v2.2.1. It supports many types of Class
  5581. 1/2 fax modems and several UNIX systems including AIX 3.2.3 or greater. 
  5582. There is also a fax modem review document at the same site as
  5583. sgi.com:/pub/fax/bakeoff. The FlexFax related files on sgi.com are
  5584. replicated on ftp.bsc.no as well.
  5585.  
  5586. Note: FlexFax 2.4.3 can be ftp'ed from ftp.ee.lbl.gov but I don't know
  5587. if that's an upgrade from the SGI version.
  5588.  
  5589. From: michael@hal6000.thp.Uni-Duisburg.DE (Michael Staats)
  5590.  
  5591. We're using mgetty+sendfax for the basic modem I/O, I wrote a printer
  5592. backend for the modem so that users can send faxes as easy as they print
  5593. postscript. I also wrote a little X interface composer to generate a
  5594. fax form that makes sending faxes very easy. You can find these
  5595. programs at hal6000.thp.Uni-Duisburg.DE under /pub/source.
  5596.  
  5597. program                comment
  5598.  
  5599. mgetty+sendfax-0.14.tar.gz    basic modem I/O, needs hacking for AIX
  5600. X11/xform-1.1.tar.gz             small and simple X interface composer
  5601.                 with an example fax form. Needs
  5602.                 libxview.a incl. headers.
  5603. faxiobe.tar.gz            fax backend, needs configuring for
  5604.                 your local site
  5605.  
  5606. If you need a binary version of libxview.a and the headers you'll find
  5607. them under /pub/binaries/AIX-3-2/lxview.tar.gz.
  5608.  
  5609.  
  5610. 4.23  lsof - LiSt Open Files
  5611. From: abe@vic.cc.purdue.edu (Vic Abell)
  5612.  
  5613. Q. How can I determine the files that a process has opened?
  5614. Q. How can I locate the process that is using a specific network address?
  5615. Q. How can I locate the processes that have files open on a file system?
  5616.  
  5617. A. Use lsof (LiSt Open Files).
  5618.  
  5619. Lsof is available via anonymous ftp from vic.cc.purdue.edu
  5620. (128.210.15.16) in pub/lsofVVVtar.Z where VVV is the version number,
  5621. currently 229.
  5622.  
  5623.  
  5624. 4.24  popper - POP3 mail daemon
  5625.  
  5626. The POP server is available via anonymous ftp from 
  5627. ftp.qualcomm.com:/quest/unix/servers/popper
  5628.   The makefile supports AIX
  5629. ftp.CC.Berkeley.EDU (128.32.136.9, 128.32.206.12).
  5630.   There are two versions in the pub directory: a compressed tar file
  5631.   popper-version.tar.Z and a Macintosh StuffIt archive in BinHex format
  5632.   called MacPOP.sit.hqx.
  5633.  
  5634. Problems building some versions of popper can sometimes be resolved by
  5635. compiling with bsdcc or -D_BSD.
  5636.  
  5637.  
  5638. 4.26: mpeg link errors version 2.0
  5639. posted by (Nathan Lane) nathan@seldon.foundation.tricon.com 
  5640.  
  5641. .XShmCreateImage
  5642. .XShmDetach
  5643. .XShmAttach
  5644. .XShmGetEventBase
  5645. .XShmPutImage
  5646. .XShmQueryExtension
  5647.  
  5648. ... are for the Shared Memory extension of the X server.
  5649. You can either choose to build it with shared memory or without.  I
  5650. always do it without the performance increase is not really
  5651. incredible, except on something like a 2x0 machine with the local bus
  5652. graphics adapter.  Just take out "DSH_MEM" in the CFLAGS in the
  5653. makefile for mpeg_play.  There is more information about shared memory
  5654. link errors in section 1.513.
  5655.  
  5656. Also, in the module "video.c" for mpeg_play it will complain about not
  5657. having enough memory to fully optimize one of the loops.  You can get
  5658. around that by specificying "qmaxmem=8000" in your cflags line, BUT,
  5659. the extra optimization does little good in my tests.
  5660.  
  5661.  
  5662. 4.27: NNTP, INN
  5663.  
  5664. Link errors compiling nntp may occur because your machine lacks the
  5665. "patch" command.  Patch can be obtained from GNU repositories
  5666.  
  5667.  
  5668. ______________________________________________________________________________
  5669. 5.00: Third party products
  5670.  
  5671. [ Ed.: Entries in this section are edited to prevent them from looking
  5672.   like advertising. Prices given may be obsolete. Companies mentioned
  5673.   are for reference only and are not endorsed in any fashion. ]
  5674.  
  5675.  
  5676. 5.02: Disk/Tape/SCSI
  5677. From: anonymous
  5678.  
  5679. - Most SCSI disk drives work (IBM resells Maxtor, tested Wren 6&7 myself);
  5680.   use osdisk when configuring (other SCSI disk).
  5681.  
  5682. - Exabyte: Unfortunately only the ones IBM sells are working.
  5683.   A few other tape drives will work; 
  5684.   use ostape when configuring (other SCSI tape).
  5685.  
  5686. - STK 3480 "Summit": Works with Microcode Version 5.2b
  5687.  
  5688.  
  5689. From: bell@hops.larc.nasa.gov (John Bell)
  5690.                
  5691. In summary, third party tape drives work fine with the RS/6000 unless 
  5692. you want to boot from them. This is because IBM drives have 'extended 
  5693. tape marks', which IBM claims are needed because the standard marks 
  5694. between files stored on the 8mm tape are unreliable. These extended 
  5695. marks are used when building boot tapes, so when the RS/6000 boots, it 
  5696. searches for an IBM tape drive and refuses to boot without it.
  5697.  
  5698. From: jrogers@wang.com (John Rogers)
  5699.  
  5700. On booting with non-IBM SCSI tape drives: I haven't tried it myself but
  5701. someone offered:
  5702.  
  5703. Turn machine on with key in secure position.
  5704. Wait until LED shows 200 and 8mm tape has stopped loading.
  5705. Turn key to service position.
  5706.  
  5707.  
  5708. From: amelcuk@gibbs.clarku.edu (Andrew Mel'cuk)
  5709.  
  5710. The IBM DAT is cheap and works.  If you get all the patches beforehand
  5711. (U407435, U410140) and remember to buy special "Media Recognition
  5712. System" tapes (Maxell, available from APS 800.443.4461 or IBM #21F8758)
  5713. the drive can even be a pleasure to use.  You can also flip a DIP switch
  5714. on the drive to enable using any computer grade DAT tapes (read the
  5715. hardware service manual).
  5716.  
  5717. Other DAT drives also work.  I have tried the Archive Python (works) and
  5718. experimented extensively with the Archive TurboDAT.  The TurboDAT is a
  5719. very fast compression unit, is not finicky with tapes and doesn't
  5720. require the many patches that the IBM 7206 does.  Works fine with the
  5721. base AIX 3.2 'ost' driver.
  5722.  
  5723.  
  5724. From: pack@acd.ucar.edu (Daniel Packman)
  5725.  
  5726. >>You can boot off of several different brands of non-IBM Exabytes.
  5727. >>At least TTI and Contemporary Cybernetics have done rather complete
  5728. >>jobs of emulating genuine IBM products.
  5729.  
  5730. A model that has worked for us from early AIX 3.1 through 3.2 is a TTI
  5731. CTS 8210.  This is the old low density drive.  The newer 8510 is dual
  5732. density (2.2gig and 5gig).  Twelve dip switches on the back control the
  5733. SCSI address and set up the emulation mode.  These drives have a very
  5734. useful set of lights for read-outs (eg, soft error rate, tape remaining,
  5735. tape motion, etc.).
  5736.  
  5737.  
  5738. 5.03: Memory
  5739.  
  5740. I got a flyer from Nordisk Computer Services (Portland 503-598-0111, 
  5741. Seattle 206-242-7777).  Some sample prices:
  5742.  
  5743.       16 MB Upgrade Kit   $  990
  5744.       32 MB Upgrade Kit   $1,700
  5745.       64 MB Upgrade Kit   $3,300
  5746.  
  5747. 5xx machines have 8 memory slots, 3x0s have 2, and 3x5s have only one.
  5748. You need to add memory in pairs for the 5xx machines excepting the 520.
  5749.  
  5750. Models 220, 230 and 250 can use "PS/2" style SIMM memory.  All have 8
  5751. SIMM sockets.  60ns or better is needed for the 250, 70ns should be OK
  5752. in the 220 and 230.  The 220 and 230 are limited to 64MB of memory,
  5753. the 250 is limited to 256MB.
  5754.  
  5755.  
  5756. 5.04: Others
  5757. From: anonymous
  5758.        
  5759. IBM RISC System/6000 Interface Products
  5760.  
  5761. National Instruments Corporation markets a family of instrumentation
  5762. interface products for the IBM RISC System/6000 workstation family.  The
  5763. interface family consists of three products that give the RISC
  5764. System/6000 connectivity to the standards of VMEbus, VXIbus and GPIB. 
  5765. For more information, contact National Instruments Corporation,
  5766. 512-794-0100 or 1-800-433-3488.
  5767.  
  5768.  
  5769. 5.05: C++ compilers
  5770.  
  5771. Several C++ compilers are available. You can choose from Glockenspiel,
  5772. Greenhills, IBM's xlC (sold seperatly :), and GNU's g++. Glockenspiel
  5773. may now be part of Computer Associates. Comeau Computing
  5774. (718-945-0009) offers Comeau C++ 3.0 with Templates. For a full
  5775. development environment there's ObjectCenter's C++ (formerly Saber
  5776. C++).
  5777.  
  5778.  
  5779. 5.06: Memory leak detectors
  5780.  
  5781. IBM's xlC comes with a product called the HeapView debugger that can
  5782. trace memory problems in C and C++ code.
  5783.  
  5784. SENTINEL has full memory access debugging capabilities including detection 
  5785. of memory leaks.  Contact info@vti.com (800) 296-3000 (703) 430-9247.
  5786.  
  5787. Insight from ParaSoft (818) 792-9941.
  5788. There is also a debug_malloc posted in one of the comp.sources groups.
  5789.  
  5790. From: d.dennerline@bull.com (Dave Dennerline)
  5791.   Purify from Pure software (408) 720-1600.
  5792.   TestCenter from Centerline (800) 669-2687.
  5793. Purify and TestCenter are not availible for the RS/6000 :(
  5794.  
  5795.  
  5796. 5.07: PPP
  5797.  
  5798. PPP does not come with AIX 3.2.x (only SLIP) and there isn't a version
  5799. availible for anonymous ftp.  PPP for AIX is availible for $ from
  5800. Morningstar (sales@morningstar.com or marketing@morningstar.com) (800)
  5801. 558-7872.
  5802.  
  5803.  
  5804. 5.08: Graphics adapters
  5805.  
  5806. Abstract Technologies Inc. (Austin TX, 512-441-4040, info@abstract.com)
  5807. has several high performance graphics adapters for the RS/6000.
  5808. 1600x1200, 24-bit true-color, and low cost 1024x768 adapters are
  5809. available.  Retail prices are between US$1000-2000.
  5810.  
  5811.  
  5812. 5.09: Training Courses
  5813.  
  5814. Email training@skilldyn.com with "help" in the body of the message for
  5815. information about how to receive a list course descriptions for AIX*
  5816. and/or UNIX* courses offered by Skill Dynamics.
  5817.  
  5818. 5.10: Hardware Vendors
  5819.  
  5820. New & Used RS6000s, peripherals
  5821. Core Systems Inc, 1605 12th Ave Seattle WA 98122 
  5822. (800) 329-2449  fax: (206) 329-3799
  5823. http://www.corsys.com/homeworld
  5824.  
  5825. ______________________________________________________________________________
  5826. 6.00: Miscellaneous other stuff
  5827.  
  5828. 6.01: Can I get support by e-mail?
  5829.  
  5830. AIXServ is a service tool that allows users on internet and usenet to
  5831. report problems via unix mail. AIXServ is free. To receive instructions 
  5832. on using AIXServ, send a note with "Subject: package" to one of the
  5833. following e-mail addresses:
  5834.  
  5835.     Usenet:     uunet.UU.NET!aixserv!aixbugs
  5836.     Internet:   aixbugs@austin.ibm.com     (transactions request)
  5837.                     services@austin.ibm.com    (administrivia)
  5838.                     aasc@austin.ibm.com        (test cases under 100KB)
  5839.  
  5840. Using AIXServ, customers have the ability to 1) open new problem reports,
  5841. 2) update existing problem records, and 3) request a status update on an
  5842. existing problem record. Currently this service is available to United
  5843. States customers only.
  5844.  
  5845. Canada:
  5846.  
  5847. Gary Tomic mentioned that Canadian customers can get support from their
  5848. BBS, cac.toronto.ibm.com at 142.77.253.16.
  5849.  
  5850. Germany:
  5851.  
  5852. Thomas Braunbeck reported that German customers with ESS (extended
  5853. software service) contracts can get support by e-mail too. They can 
  5854. obtain information by sending mail with Subject: help to 
  5855. aixcall@aixserv.mainz.ibm.de.
  5856.  
  5857. Various flavors of service offerings are available. Contact your IBM rep
  5858. for details.
  5859.  
  5860.  
  5861. 6.02: List of useful faxes
  5862.  
  5863. You can get some informative faxes by dialing IBM's Faxserver at
  5864. 1-800-IBM-4FAX. If you're calling for the first time, push 3 then 2 to
  5865. request a list of RS/6000 related faxes.
  5866.  
  5867. document number                       Title
  5868. ---------------  -----------------------------------------------------
  5869.      1453        Recovering from LED 518 in AIX 3.2
  5870.      1457        Recovering from LED 552 in AIX 3.1 and 3.2
  5871.      1461        Alternative Problem Reporting Methods
  5872.      1470        Recovering from LED 223/229, 225/229, 233/235, 221/229, or 221
  5873.      1537        How to Get AIX Support
  5874.      1719        Performance Analyzer/6000
  5875.      1721        Recovering from LED 553 in AIX 3.1 and 3.2
  5876.      1746        Recovering from LED 551 in AIX 3.1 and 3.2
  5877.      1755        Recovering Volume Groups
  5878.      1802        Repairing File Systems with fsck in AIX 3.1 and 3.2
  5879.      1803        How to Take a System Dump
  5880.      1804        Setting Up a Modem With the RS/6000
  5881.      1845        Using iptrace to Track Remote Print Jobs
  5882.      1867        Clearing the Queuing System
  5883.      1895        Removing/Replacing a Fixed Disk
  5884.      1896        Tape Drive Densities and Special Files
  5885.      1897        Tips on mksysb for AIX 3.2
  5886.      1909        UUCP (BNU) Helpful Information
  5887.      1910        Synchronizing Disk Names
  5888.      1988        Recovering from LED 201 in AIX 3.1 and 3.2
  5889.      1989        Recovering from LED 727 in AIX 3.2
  5890.      1991        Recovering from LED c31 in AIX 3.1 and 3.2
  5891.      2079        AIX 3.2.4
  5892.      2121        AIX 3.2.4 Installation Tips
  5893.      2267        How to reduce /usr in AIX 3.2
  5894.      2443        Man pages for AIX 3.2
  5895.      2446        How to set up sar
  5896.      2447        How to reduce /tmp
  5897.      2448        Installing a 5 GB tape drive
  5898.      2462        Bosboot diskettes
  5899.      2465        How to remove ptfs from the ODM
  5900.  
  5901. 6.03: IBM's gopher, WWW, aftp presence (as of 6/10/94)
  5902. Thanks to Ronald S. Woan <woan@austin.ibm.com>
  5903.  
  5904. aix.boulder.ibm.com        (FixDist ptfs)
  5905. software.watson.ibm.com        (rlogin fixes & more)
  5906. gopher.ibmlink.ibm.com        (anonouncements & press releases)
  5907. www.austin.ibm.com        (software, hardware, service & support)
  5908.  
  5909. General IBM information like product announcements and press releases
  5910. are available through World Wide Web at http://www.ibm.com/
  5911.  
  5912. Specific information on the RISC System/6000 product line and AIX
  5913. (highlights include marketing information, technology White Papers and
  5914. the POWER 2 technology book online before it hits the presses,
  5915. searchable APAR database and AIX support FAX tips online so you don't
  5916. have to type in all those scripts) is available at http://www.austin.ibm.com/
  5917.  
  5918.  
  5919. 6.04: Some RS232 hints
  5920. From: graeme@ccu1.aukuni.ac.nz, sactoh0.SAC.CA.US!jak
  5921.  
  5922. Q: How do you connect a terminal to the RS232 tty ports when not using
  5923.    the standard IBM cable & terminal transposer?
  5924. A: 1- Connect pins 2->3, 3->2, 7->7 on the DB25's
  5925.    2- On the computer side, most of the time cross 6->20 (DSR, DTR).
  5926.       Some equipment may require connecting 6, 8, and 20 (DSR, DCD, DTR).
  5927.  
  5928. Also, pin 1 (FG) should be a bare metal wire and the cable should be
  5929. shielded with a connection all the way through. Most people don't run
  5930. pin 1 because pins 1 & 7 (SG) are jumpered on many equipment.
  5931.  
  5932. When booting from diskettes, the port speed is always 9600 baud.  If you
  5933. use SMIT to set a higher speed (38400 is nice) for normal use, remember
  5934. to reset your terminal before booting.
  5935.  
  5936. Q: How do you connect a printer to the RS232 tty ports
  5937. A: 1- Connect pins 2->3, 3->2, 7->7 on the DB25's
  5938.    2- On the computer side, loop pins 4->5 (CTS & RTS)
  5939.  
  5940.  
  5941. 6.05  What publications are available for AIX and RS/6000?
  5942.  
  5943. The following are free just for the asking:
  5944.  
  5945. RS/Magazine
  5946.    P.O. Box 3272
  5947.    Lowell, MA 01853-9876
  5948.    e-mail: aknowles@expert.com (Anne Knowles, editor)
  5949.  
  5950. AIXpert
  5951.    IBM Corporation
  5952.    Mail Stop 36
  5953.    472 Wheelers Farms Road
  5954.    Milford, CT 06460
  5955.    FAX: (203) 783-7669
  5956.  
  5957. RiSc World
  5958.    P.O. Box 399
  5959.    Cedar Park, TX 78613
  5960.    FAX: (512) 331-3900
  5961.    Usenet: {cs.utexas.edu,execu,texbell}!pcinews!rsworld
  5962.  
  5963. These manuals should be available from your favorite IBM office.
  5964.  
  5965. SC23-2204-02  Problem Solving Guide
  5966. SC23-2365-01  Performance Monitoring and Tuning Guide for AIX 3.2
  5967. SA23-2629-07  Service Request Number Cross Reference, Ver 2.2
  5968. SA23-2631-05  Diagnostic Programs: Operator Guide
  5969. SA23-2632-05  Diagnostic Programs: Service Guide
  5970. SA23-2643-01  Hardware Technical Reference: General Information
  5971. SA23-2646-01  Hardware Technical Reference: Options and Devices
  5972.  
  5973. "Power RISC System/6000: Concepts, Facilities, Architecture", Chakravarty  
  5974.          McGraw-Hill ISBN 0070110476
  5975. "PowerPC: Concepts, Facilities, Architecture", Chakravarty/Cannon  
  5976.          McGraw-Hill ISBN 0070111928
  5977. "The Advanced Programmer's Guide to AIX 3.x", Colledge 
  5978.          McGraw-Hill ISBN 007707663X
  5979. "AIX Companion" , Cohn    
  5980.          Prentice-Hall ISBN 0132912201
  5981. "AIX for RS/6000: System & Administration Guide", DeRoest 
  5982.          McGraw-Hill ISBN 0070364397
  5983. "A Guide to AIX 3.2", Franklin
  5984.          Metro-Info Systems 05/1993
  5985. "IBM RS6000 AIX System Administration", Hollicker
  5986.          Prentice-Hall ISBN 0134526163
  5987. "IBM RISC SYSTEM/6000 - A Business Perspective", Hoskins
  5988.          John Wiley & Sons ISBN 0471599352
  5989. "The Advanced Programmer's Guide to AIX 3.x", Phil Colledge
  5990.     McGraw-Hill, 1994, ISBN: 0-07-707663-x
  5991.  
  5992.  
  5993. 6.06: Some acronyms
  5994.  
  5995. APAR - authorized program analysis report
  5996. BOS  - Basic Operating System
  5997. DCR  - design change request
  5998. LPP  - Licensed Program Product
  5999. ODM  - Object Database Manager
  6000. PRPQ - programming request for price quotation
  6001. PTF  - Program Temporary Fix
  6002. SMIT - System Management Interface Tool
  6003.  
  6004.  
  6005. 6.07: How do I get this by mailserver or ftp?
  6006.  
  6007. Since the articles are crossposted to news.answers, any archive carrying
  6008. that newsgroup will also have these articles. In particular, try
  6009. rtfm.mit.edu in the directory pub/usenet/news.answers. This FAQ is
  6010. archived as "aix-faq/part[123]".
  6011.  
  6012.  
  6013. 6.08: Hypertext version of the FAQ
  6014.  
  6015. United States:
  6016.   http://www.cis.ohio-state.edu/hypertext/faq/usenet/aix-faq/top.html
  6017.   http://www.chem.emory.edu/
  6018. New Zeland:
  6019.   http://www.abstract.co.nz/aix-faq/faq.html
  6020. France:
  6021.   http://www-resus.univ-mrs.fr/Us/CS/RS6k/
  6022. Canada:
  6023.   http://auk.uwaterloo.ca/aixgroup/aix-faq
  6024.  
  6025.  
  6026. 6.09: Where can I send suggestions for tools?
  6027.  
  6028. If you have any suggestions or comments about tools, whether currently or 
  6029. desirable to be in AIX, send a note to aix_tool_ideas@austin.ibm.com.
  6030.  
  6031.  
  6032. 6.10: Comp.unix.aix archive availible on the WWW
  6033.  
  6034. Michael Staats & Fred Hucht have informed me that a 
  6035. searchable archive of comp.unix.aix is availible at: 
  6036. http://www.thp.Uni-Duisburg.DE:/cuaix/cuaix.html.
  6037.  
  6038.  
  6039. _____________________________________________________________________________
  6040. 7.00: Contributors
  6041.  
  6042. The following persons have contributed to this list.  If you want to
  6043. contribute anonymously, just let me know - but do tell me who you are.
  6044. I apologise if I missed out anyone.
  6045.  
  6046. Thank you all, this would definitely not be the same without _your_ input.
  6047.  
  6048. Luis Basto            <basto@cactus.org>
  6049. Rudy Chukran            <chukran@austin.VNET.IBM.COM>
  6050. Christopher Carlyle O'Callaghan    <asdfjkl@wam.umd.edu>
  6051. Poul-Henning Kamp        <phk@data.fls.dk>
  6052. Richard Wendland                <richard@praxis.co.uk>
  6053. Ge van Geldorp            <ge@dutlru2.tudelft.nl>
  6054. Chris Jacobsen            <jacobsen@sbhep2.phy.sunysb.edu>
  6055. Peter Jeffe            <peter@ski.austin.ibm.com>
  6056. Jean-Francois Panisset        <panisset@thunder.mcrcim.mcgill.edu>
  6057. John Cary            <cary@boulder.colorado.edu>
  6058. Vijay Debbad            <vijay@ingres.com>
  6059. Dick Karpinski            <dick@ccnext.ucsf.edu>
  6060. Konrad Haedener            <haedener@iac.unibe.ch>
  6061. Doug Sewell            <DOUG@YSUB.YSU.EDU>
  6062. David Cordes            <cordes@athos.cs.ua.edu>
  6063. Graeme Moffat            <g.moffat@aukuni.ac.nz>
  6064. Andrew Pierce            <pierce@claven.cambridge.ibm.com>
  6065. Stephen Linam            <sdl@glasnost.austin.ibm.com>
  6066. Jerome Park            <jerome%aixserv@uunet.UU.NET>
  6067. Konrad Haedener            <haedener@iacrs1.unibe.ch> 
  6068. Steve Roseman            <lusgr@chili.CC.Lehigh.Edu>
  6069. John Burton            <burton@asdsun.larc.nasa.gov>
  6070. Thierry Forveille        <FORVEILL@FRGAG51.BITNET>
  6071. Joubert Berger            <afc-tci!joubert>
  6072. Minh Tran-Le            <tranle@intellicorp.com>
  6073. Paul Amaranth            <amaranth@vela.acs.oakland.edu>
  6074. Mark Whetzel            <markw@airgun.wg.waii.com>
  6075. Daniel Packman            <pack@acd.ucar.edu>
  6076. Ken Bowman            <bowman@uiatma.atmos.uiuc.edu>
  6077. Cary E. Burnette        <kerm@mcnc.org>
  6078. Christophe Wolfhugel        <wolf@grasp1.univ-lyon1.fr>
  6079. Leonard B. Tropiano        <lenny@aixwiz.austin.ibm.com>
  6080. Bill Wohler            <wohler@newt.com>
  6081. James Salter            <jsalter@ibmpa.awdpa.ibm.com>
  6082. Witold Jan Owoc            <witold@enme.ucalgary.ca>
  6083. Marc Kwiatkowski        <marc@ultra.com>
  6084. Ronald S. Woan            <woan@austin.ibm.com>
  6085. Mijan Huq            <huq@hagar.ph.utexas.edu>
  6086. Herbert van den Bergh        <hbergh@nl.oracle.com>
  6087. Michael Stefanik        <mike@bria.UUCP>
  6088. John F. Haugh            <jfh@rpp386.cactus.org>
  6089. Ed Kubaitis            <ejk@ux2.cso.uiuc.edu>
  6090. Jaime Vazquez            <jaime@austin.vnet.ibm.com>
  6091. Bjorn Engsig            <bengsig@oracle.com>
  6092. Frank Kraemer             <kraemerf@franvm3.VNET.IBM.COM>
  6093. Andreas Siegert                 <afx@muc.ibm.de>
  6094. Thomas Braunbeck                <braunbec@aixserv.mainz.ibm.de>
  6095. Marc Pawliger            <marc@sti.com>
  6096. Mel Beckman            <mbeckman@mbeckman.mbeckman.com >
  6097. Ole Holm Nielsen        <Ole.H.Nielsen@fysik.dtu.dk>
  6098. David Dennerline        <d.dennerline@bull.com>
  6099. _____________________________________________________________________________
  6100.  
  6101. Opinions expressed here have nothing to do with IBM or my employer (AMS)
  6102. infact most of these opinions are borrowed from other people :)
  6103.  
  6104. All trademarks are the property of their respective owners.
  6105.  
  6106. -- 
  6107. Jeff Warrington
  6108. a165@lehigh.edu  
  6109.  
  6110.